1
import os, sys, subprocess
4
with open(args[0], 'w') as f:
5
f.write(' '.join(args[1:]))
7
def writeenvtofile(args):
8
with open(args[0], 'w') as f:
9
f.write(os.environ[args[1]])
11
def writesubprocessenvtofile(args):
12
with open(args[0], 'w') as f:
13
p = subprocess.Popen([sys.executable, "-c",
14
"import os; print os.environ['%s']" % args[1]],
15
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
16
stdout, stderr = p.communicate()
17
assert p.returncode == 0
20
def convertasplode(arg):
24
return (None if arg == "None" else arg)
27
arg0 = convertasplode(args[0])
30
def asplode_return(args):
31
arg0 = convertasplode(args[0])