I'm having trouble opening a file in linux, whose path has spaces in it.

$ mkdir my\ test
$ echo test > my\ test/test.txt
$ python

>>> open('./my test/test.txt')
Exception
>>> open('./my\\ test/test.txt')
Exception

but yet...

>>> import os
>>> os.chdir('./my test')
>>> open('./test')

works just fine.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to