[Tutor] Window pathnames

Gerrit Holl gerrit at nl.linux.org
Fri Oct 3 06:12:05 EDT 2003


<quote name="Zandbergen Christian" date="1065179399" email="Christian.Zandbergen at swisslife.ch">
> and the following Error occures:
> 
> 	Python 2.1.3 (#35, Apr  8 2002, 17:47:50) [MSC 32 bit (Intel)] on
> win32
> 	Type "copyright", "credits" or "license" for more information.
> 	>>> open("C:\\dslfjsl\jlsfjslfsj")
> 	Traceback (most recent call last):
> 	  File "<stdin>", line 1, in ?
> 	IOError: [Errno 2] No such file or directory:
> 'C:\\dslfjsl\\jlsfjslfsj'
> 
> 
> It seems that one backslash always returns a double backslash.
</quote>

Have you tried to prepend the string with 'r' (e.g. r'C:\aaa\bbb')?

Gerrit.

-- 
Mozilla _is_ the web: it grows faster than you can download it.
1011001 1101111 1110101 1110010 1110011 0101100
1000111 1100101 1110010 1110010 1101001 1110100



More information about the Tutor mailing list