os.system() bug?

Johan Fredrik Øhman johanfo at ohman.no
Sun Jun 8 18:22:44 EDT 2003


Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32

>>> os.system('"C:\Program Files\UltraEdit\uedit32.exe" "arg"')
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
1
>>> os.system('""C:\Program Files\UltraEdit\uedit32.exe" "arg"')
0

I am really stumbeled by this!  Why do I have to write two " at the
beginning of the command to make it work?  Seems like this problem only
occurs when there is a space in the path.

--
Johan Fr Ohman






More information about the Python-list mailing list