New submission from Aaron Sherman:
This documentation states that libraries can turn off logging by adding a
NullHandler:
http://docs.python.org/2/howto/logging.html#configuring-logging-for-a-library
This is not entirely true. It only holds true if the application which calls
the library has
Aaron Sherman added the comment:
I think it's still safe to say that high performance applications which need to
create many hundreds or thousands of children (e.g. large monitoring systems)
will still need another solution that isn't subprocess. That being said, you're
right
Aaron Sherman added the comment:
"That's why I asked for absolute numbers for the overhead difference."
Did you not follow the link in my first post? I got pretty detailed, there.
"os.popen just calls the popen(3) library call, which just performs a
fork/execve and some
Aaron Sherman added the comment:
"Python 3.2 has a _posixsubprocess: some parts of subprocess are implemented in
C. Can you try it?"
I don't have a Python 3 installation handy, but I can see what I can do
tomorrow evening to get one set up and try it out.
"disagre
New submission from Aaron Sherman :
I wrote some code a while back which used os.popen. I recently got a warning
about popen being deprecated so I tried a test with the new subprocess module.
In that test, subprocess.Popen appears to have a 40% process creation overhead
penalty over os.popen
Aaron Sherman added the comment:
Matthew, thank you for replying. I still think the primary issue is the
potential for confusion between single digit escapes and backreferences, and
the ease with which they could be addressed, but to cover what you said:
Quote: the normal way to handle &quo
New submission from Aaron Sherman :
I tested this under 2.6 and 3.1. Under both, the common mistake that I'm sure
many others have made, and which cost me quite some time today was:
re.sub(r'(foo)bar', '\1baz', 'foobar')
It's obvious, I'm sure,
Aaron Sherman added the comment:
I'm closing this out, as the previous poster was correct: the module
does the right thing, and I misread the documentation. Thanks!
--
status: open -> closed
___
Python tracker
<http://bugs.python.or
New submission from Aaron Sherman :
First off, I want to be clear that this isn't a request for changes to
functionality, nor for debate over decisions which have already been
made. This is purely a request for correction to mis-statements about
the nature and origins of optparse's h