passing a variable to an external program
Neil Cerutti
horpner at yahoo.com
Thu Jan 11 14:18:29 EST 2007
On 2007-01-11, Rich <richfahey at gmail.com> 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 ' + pathname + '\test.vbs')
Use / instead of \, or \\ instead of \.
--
Neil Cerutti
Ushers will eat latecomers. --Church Bulletin Blooper
More information about the Python-list
mailing list