problems with opening files due to file's path

Carsten Haese carsten.haese at gmail.com
Wed Jun 11 08:40:28 EDT 2008


Alexnb wrote:
> I don't think you understand it doesn't matter how the variable gets there

But it *does* matter. Compare this:

py> filename = "C:\Somewhere\01 - Some Song.mp3"
py> print filename
C:\Somewhere - Some Song.mp3

To this:

py> filename = raw_input("Enter the filename: ")
Enter the filename: C:\Somewhere\01 - Some Song.mp3
py> print filename
C:\Somewhere\01 - Some Song.mp3

Note that the "\01" in the first case seems to have disappeared, whereas 
in the second case it's preserved.

Now, if you want us to help you, please post your ACTUAL code with a 
description of the ACTUAL problem.

--
Carsten Haese
http://informixdb.sourceforge.net



More information about the Python-list mailing list