commands.getoutput does not work on win32, switch to popen
This commit is contained in:
parent
818de4a64c
commit
2893440374
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
from distutils.core import setup, Extension
|
from distutils.core import setup, Extension
|
||||||
from os import system, mkdir, path
|
from os import system, mkdir, path, popen
|
||||||
import sys, commands
|
import sys
|
||||||
|
|
||||||
build = 'build'
|
build = 'build'
|
||||||
options = {'perl':'perl'}
|
options = {'perl':'perl'}
|
||||||
|
@ -21,7 +21,7 @@ def parse_args():
|
||||||
options['perl'] = value
|
options['perl'] = value
|
||||||
|
|
||||||
def sbuild(cmd):
|
def sbuild(cmd):
|
||||||
return commands.getoutput(options['perl'] + ' -Mlib=.. -MSigarBuild -e ' + cmd)
|
return popen(options['perl'] + ' -Mlib=.. -MSigarBuild -e ' + cmd).readline()
|
||||||
|
|
||||||
def sargs(cmd):
|
def sargs(cmd):
|
||||||
res = sbuild(cmd)
|
res = sbuild(cmd)
|
||||||
|
|
Loading…
Reference in New Issue