Python 2.6 report
Martin Geisler
mg at daimi.au.dk
Fri Oct 3 06:54:26 CDT 2008
Dirkjan Ochtman <dirkjan at ochtman.nl> writes:
> Martin Geisler wrote:
>> What about including the subprocess module with Mercurial, like the
>> byterange.py file?
>>
>> The subprocess module says it is backwards compatible with Python 2.2.
>
> Would be fine with me, if it's easy to do. But I think 2.4
> subprocess is largely written in C, so not sure how easy it is.
> Though I do think I saw a pure-Python version somewhere.
I looked at the subprocess.py file found in my Python installation,
and it has a switch at the top with an "if 0:" which selects between
some pywin32 imports and a _subprocess import:
if mswindows:
import threading
import msvcrt
if 0: # <-- change this to use pywin32 instead of the _subprocess driver
import pywintypes
from win32api import GetStdHandle, STD_INPUT_HANDLE
# ...
else:
from _subprocess import *
# ...
--
Martin Geisler
VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
More information about the Mercurial-devel
mailing list