Mercurial > hg > clwapp
diff clwapp/utils.py @ 0:196f241286f7
initial import of clwapp, from https://svn.openplans.org/svn/standalone/clwapp/trunk/
author | k0s <k0scist@gmail.com> |
---|---|
date | Sun, 01 Nov 2009 18:24:35 -0500 |
parents | |
children | a0816f433861 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clwapp/utils.py Sun Nov 01 18:24:35 2009 -0500 @@ -0,0 +1,8 @@ +import subprocess + +def shargs(args): + process = subprocess.Popen('for arg in %s; do echo $arg; done' % args, + shell=True, stdout=subprocess.PIPE) + output = process.communicate()[0] + output = output[:-1] # last line will be blank + return output.split('\n')