os.system, backslash and commandline problem

Delaney, Timothy tdelaney at avaya.com
Wed Oct 31 00:30:51 CET 2001


> From: Fredrik Lundh [mailto:fredrik at pythonware.com]
> Sharriff.Aina at med-iq.de wrote:
> 
> > I tried out a file that had "dangerous" characters:
> > c:\the\boy.txt ("\t" TAB, "\b" BELL)
> 
> >>> print "c:\the\boy.txt"
> c:      hoy.txt
> >>> print "c:\\the\\boy.txt"
> c:\the\boy.txt
> 
> > This is very saddening, any clues? help?
> 
> for more info, read up on "string literals" in your favourite
> Python book, e.g:
> 
>     http://www.python.org/doc/current/ref/strings.html

In particular, look for "raw string" ...

Tim Delaney




More information about the Python-list mailing list