Windows Nt directory names
David LeBlanc
whisper at oz.net
Sun Nov 17 03:06:51 EST 2002
CMD=r'"c:\program files\action.exe"'
Note the double quotes inside the single quotes. What you are doing is
passing a quoted string to the OS and that's legal (and required as you have
found out when there are spaces in the path) :)
David LeBlanc
Seattle, WA USA
-----Original Message-----
From: python-list-admin at python.org [mailto:python-list-admin at python.org]On
Behalf Of asdfasd asdfasdf
Sent: Saturday, November 16, 2002 23:31
To: python-list at python.org
Subject: Windows Nt directory names
hi
i wanted to execute a command somewhere in "program files" directory but
can't seem to do it as it says : "c:\program" is not recognized as an
internal command
i have used :
import os
CMD = r'c:\program files\action.exe'
os.system(CMD)
how do i code so that the space in "program files" is recognized?
thanks
----------------------------------------------------------------------------
--
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20021117/19954b91/attachment.html>
More information about the Python-list
mailing list