[svn r61975] subprocess is in stdlib since 2.4

for backwards compatibility we use compat.subprocess if needed

--HG--
branch : trunk
This commit is contained in:
getxsick 2009-02-17 18:24:41 +01:00
parent 0dc97ccd5e
commit 1c85d7fe9a
4 changed files with 19 additions and 4 deletions

View File

@ -15,7 +15,11 @@ import sys
sys.path.insert(0, '.') sys.path.insert(0, '.')
import py import py
import os, subprocess import os
try:
import subprocess
except ImportError:
from py.__.compat import subprocess
def sysexec(cmd): def sysexec(cmd):
print "executing", cmd print "executing", cmd

View File

@ -1,10 +1,14 @@
import os, inspect, socket import os, inspect, socket
from subprocess import Popen, PIPE
import sys import sys
from py.magic import autopath ; mypath = autopath() from py.magic import autopath ; mypath = autopath()
from py.__.misc.warn import APIWARN from py.__.misc.warn import APIWARN
try:
from subprocess import Popen, PIPE
except ImportError:
from py.__.compat.subprocess import Popen, PIPE
import py import py
if sys.platform == "win32": if sys.platform == "win32":
win32 = True win32 = True

View File

@ -1,8 +1,11 @@
import py import py
import sys, os, re import sys, os, re
import subprocess
from distutils import sysconfig from distutils import sysconfig
from distutils import core from distutils import core
try:
import subprocess
except ImportError:
from py.__.compat import subprocess
winextensions = 1 winextensions = 1
if sys.platform == 'win32': if sys.platform == 'win32':

View File

@ -24,7 +24,11 @@ def posix_exec_cmd(cmd):
the error-output from the command. the error-output from the command.
""" """
__tracebackhide__ = True __tracebackhide__ = True
try:
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
except ImportError:
from py.__.compat.subprocess import Popen, PIPE
import errno import errno
#print "execing", cmd #print "execing", cmd