Can I use the Python 2.7 subprocess module from Python 2.6?

Can I use Python 2.7 modules from Python 2.6? Or do something to achieve the same effect?

I can use Python 2.6, but issue exists in the module subprocessprovided by Python 2.6. This is fixed in Python 2.7. I am wondering if I will attach this using pip (or the equivalent) to temporarily avoid the error until the update one day. How can i do this?

+5
source share
3 answers

Etienne Perot suggested using the backup Python 3.2 subprocess, available at http://code.google.com/p/python-subprocess32/ , rather than hacking the Python installation.

- http://hg.python.org/cpython/rev/767420808a62, , . import subprocess32 as subprocess .

+1

, . 2,6 2,7 , 2,7 2,6 3,0. Python 2.7 ( 2.6, 3.0).

, - !

EDIT. , , . Python - Python - .

+2

Python 2.6, , Python 2.6 , subprocess 2.7.

You end up with a custom Python 2.6 build. Of course, if you are stuck with the 2.6 standard because you cannot install any other version, this will not help.

+1
source

All Articles