473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Re: Suppressing Python wanings globally

On Thu, 2 Oct 2008 23:39:29 +0100, Paul Moore <p.*******@gmail.comwrote:
>How can I suppress a Python warning globally (i.e., for all instances
of Python I run)? I have a test suite that runs Python via
sys.executable, so the -W flag won't work. A wrapper script doesn't
work, as sys.executable doesn't point to that. And PYTHONSTARTUP is
only for interactive use, so that's no good...

Is there an obvious way I've missed? Surely this is a common issue?
Site-wide configuration is what site customization modules are for.
Check out sitecustomize.py in /usr/lib/python<version>/ or the equivalent
for your platform/installation.

Jean-Paul
Oct 2 '08 #1
0 751

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
23
by: Simon Wittber | last post by:
For the first time, I have been bitten by Python. The below code produces the results: False True when I initially expected the results: False False It took me a while to work out that...
68
by: Lad | last post by:
Is anyone capable of providing Python advantages over PHP if there are any? Cheers, L.
40
by: Dave Hansen | last post by:
Please note crosspost. Often when writing code requiring function pointers, it is necessary to write functions that ignore their formal parameters. For example, a state machine function might...
2
by: Tim Chase | last post by:
A couple of hopefully short (interrelated) questions: 1) is there a way to suppress the banner when starting Python interactively? Something like a "--quiet" that would just drop you straight...
5
by: Don Li | last post by:
Hi, A web app server package that I'm using includes a bunch of open source UI components (heavy with javascripts). Inevitably it has bugs, e.g. "undefined" is null or not an object. This...
0
by: Paul Moore | last post by:
How can I suppress a Python warning globally (i.e., for all instances of Python I run)? I have a test suite that runs Python via sys.executable, so the -W flag won't work. A wrapper script doesn't...
0
by: Paul Moore | last post by:
2008/10/2 Jean-Paul Calderone <exarkun@divmod.com>: Wow, that was quick! Thanks, that will do. In fact, I only want to do this for one session, so an environment variable would be more suitable...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.