Run batch files in Windows XP

Benji York benji at benjiyork.com
Mon Jul 25 17:03:33 EDT 2005


Ernesto wrote:
> Looks like I'm not getting my parameters to my batch file correctly.
> I'm using os.system like this:
> os.system('bootmanager.bat %s' %"BOOTMANAGER ALL")
> 
> where 'BOOTMANAGER ALL' is what I type at the command prompt arguments.
>  That must not be right?

The batch file will see two parameters (in %1 and %2) if that's not what 
you want, put double quotes around the %s, like so:

os.system('bootmanager.bat "%s"' % "BOOTMANAGER ALL")
--
Benji York




More information about the Python-list mailing list