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

Sharriff Aina nhytro at t-online.de
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" 
>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

></F>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20011030/69fad898/attachment.html>


More information about the Python-list mailing list