Re.Re: os.system, backslash and commandline problem

Sharriff Aina nhytro at
Tue Oct 30 23:53:46 CET 2001

Very strange answer Mr. Lundh, thanks all the same. I mentioned in the post that I know how to use raw strings and character substitution, did you read my post?

Anyways, someone adviced me to use "os.normpath" instead of replacing the backslashes, that worked well with "os.system"

>> 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" 

>> This is very saddening, any clues? help? 

>for more info, read up on "string literals" in your favourite
>Python book, e.g:



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list