python syntax:urgent

Jeroen Ruigrok van der Werven asmodai at in-nomine.org
Tue Jan 8 04:03:56 EST 2008


-On [20080108 09:42], mpho raborife (mraborife at yahoo.com) wrote:
>subprocess.Popen(["gmmscore", "-i", Input, "-l", List, "-t",
> modeltype, "-m", str(mixture), "-d", str(dimension), "-v", str(vfloor),
> "-n", str(number), "-r", str(results)])

"gmmscore", "-i" seems a bit silly, why not just "gmmscore -i"?

You can always do something like (assuming all arguments are strings, adjust
accordingly):

s = "gmmscore -i %s -l %s -t %s -m %s -d %s -v %s -n %s -r %s" %
    (Input, List, modeltype, str(mixture), str(dimension), str(vfloor),
     str(number), str(results))

subprocess.Popen([s])

-- 
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http://www.rangaku.org/
Few are those who see with their own eyes and feel with their own hearts...



More information about the Python-list mailing list