passing a variable to an external program

2007-01-11 Thread Rich
I want to run an external program using os.system() but I want to include a variable in the middle of the command line. An example of the type of thing I want to be able to do: pathname = os.path.dirname(sys.argv[0]) os.system('cscript /nologo ' + pathname + '\test.vbs') When I run this,

Re: passing a variable to an external program

2007-01-11 Thread Neil Cerutti
On 2007-01-11, Rich [EMAIL PROTECTED] wrote: I want to run an external program using os.system() but I want to include a variable in the middle of the command line. An example of the type of thing I want to be able to do: pathname = os.path.dirname(sys.argv[0]) os.system('cscript /nologo ' +

Re: passing a variable to an external program

2007-01-11 Thread Rich
Thank you, that did it. I don't know why I didn't think to escape the \ with \\. On Jan 11, 2:18 pm, Neil Cerutti [EMAIL PROTECTED] wrote: On 2007-01-11, Rich [EMAIL PROTECTED] wrote: I want to run an external program using os.system() but I want to include a variable in the middle of the