Re: [Python-Dev] Redirecting warnings.showwarning to logging

2008-11-23 Thread Antoine Pitrou
Brett Cannon python.org> writes: > > It is specifically there to be overridden (and as an aside, it was a > pain to support in the C port of warnings), so it really isn't > monkey-patching. =) Should we coin a new word for this? Pretty-patching? cheers Antoine. __

Re: [Python-Dev] Redirecting warnings.showwarning to logging

2008-11-23 Thread Nick Coghlan
Antoine Pitrou wrote: > Brett Cannon python.org> writes: >> It is specifically there to be overridden (and as an aside, it was a >> pain to support in the C port of warnings), so it really isn't >> monkey-patching. =) > > Should we coin a new word for this? Pretty-patching? When the module docs

Re: [Python-Dev] Redirecting warnings.showwarning to logging

2008-11-23 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nick Coghlan wrote: > Antoine Pitrou wrote: >> Brett Cannon python.org> writes: >>> It is specifically there to be overridden (and as an aside, it was a >>> pain to support in the C port of warnings), so it really isn't >>> monkey-patching. =) >> Shou

[Python-Dev] mlockall() in Python?

2008-11-23 Thread Evgeni Golov
Hi, I'd like to write a small daemon in Python, which should never be swapped out (on Linux, this daemon will be Linux specific, so no need in a platform-independent solution). In C I'd do: #include mlockall(MCL_FUTURE); //do stuff here munlockall(); Is there anything similar in Python? TIA &

Re: [Python-Dev] mlockall() in Python?

2008-11-23 Thread Guilherme Polo
On Sun, Nov 23, 2008 at 10:44 PM, Evgeni Golov <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like to write a small daemon in Python, which should never be > swapped out (on Linux, this daemon will be Linux specific, so no need > in a platform-independent solution). > > In C I'd do: > #include > mlockal

[Python-Dev] subprocess.Popen: change default buffer size?

2008-11-23 Thread Victor Stinner
subprocess.Popen is much SLOWER than os.popen() on Mac and Solaris. The goal is to read the output of a command (through a pipe) as fast as possible. The problem is the pipe buffering (the reader file in the Python process). Today, subprocess.Popen() uses bufsize=0 by default. It should be buf