os.system and quoted strings

Dan Bishop danb_83 at yahoo.com
Tue Feb 27 20:53:34 EST 2007


On Feb 27, 9:16 am, Steven D'Aprano
<s... at REMOVE.THIS.cybersource.com.au> wrote:
> On Tue, 27 Feb 2007 06:24:41 -0800, svata wrote:
...
> > import time
> > import os
>
> > dir = "C:\\Documents and Settings\\somepath\\"
>
> I believe that Windows will accept forward slashes as directory
> separators, so you can write that as:
>
> dir = "C:/Documents and Settings/somepath/"

Windows system calls treat / and \ interchangeably, but the command
prompt insists on backslashes.




More information about the Python-list mailing list