[Python-Dev] Re: PEP 324: popen5 (original) (raw)
[Python-Dev] Re: PEP 324: popen5 - New POSIX process module
Guido van Rossum guido at python.org
Thu Jan 8 16:58:25 EST 2004
- Previous message: [Python-Dev] Re: PEP 324: popen5 - New POSIX process module
- Next message: [Python-Dev] Re: [Python-checkins] python/nondist/peps pep-0325.txt, NONE, 1.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 05-01-2004 15:11, Michael Chermside wrote: >So I guess I am forced to put up with (2), and the (hopefully minor) >headaches of copying Mark's code UNLESS we can somehow ensure that >win32all is available on all sane windows installs. If, for instance, >it were released with the python.org releases for the Windows platform, >(other packagers already include it), then I think we could dispense >with the annoying need to duplicate code.
A number of people seem to under the impression that win32all contains a lots of useful value added code. It does not. It is a very thin SWIG wrapper over the windows API that it exposes. There is nothing that you will need to copy from it to implement popen5 in C. Just as you would not copy code from the python posix module to implement popen5 in C on Unix. The value of using win32all would be that you could implement popen5 in python rather then C. This might be a good way to develop and test the win32 popen5 algorithms before conversion to C. Developing the algorithm is going to be the hard part. The issue is a packaging one not a code cloning one. 1) include win32all in the standard windows python and implement popen5 in python 2) implement popen5 in C on windows. As I understand it (2) is the suggested way forwards. Barry
Hm. I'd much rather see a pure Python implementation. This doesn't seem to be something that's particularly performance critical. Starting a process takes so many OS resources that the overhead of doing it in Python is negligeable.
I expect only a very small number of win32all entry points to be needed in order to implement popen5, and those we can implement in a separate C module (just as we did for _winreg, which roughly duplicates the registry access API from win32all).
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Re: PEP 324: popen5 - New POSIX process module
- Next message: [Python-Dev] Re: [Python-checkins] python/nondist/peps pep-0325.txt, NONE, 1.1
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]