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 in theory, but as it's a personal build I can tweak
sitecustomize.p y for now and get the result I want.
Thanks,
Paul.
On Thu, 2 Oct 2008 23:39:29 +0100, Paul Moore <p.f.moore@gmai l.comwrote:
>
Site-wide configuration is what site customization modules are for.
Check out sitecustomize.p y in /usr/lib/python<version>/ or the equivalent
for your platform/installation.
>>
>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?
>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.p y in /usr/lib/python<version>/ or the equivalent
for your platform/installation.
this for one session, so an environment variable would be more
suitable in theory, but as it's a personal build I can tweak
sitecustomize.p y for now and get the result I want.
Thanks,
Paul.