Dan Stromberg wrote:
Are you on windows?
You probably should use / as your directory separator in Python, not \.
In Python, and most other programming languages, \ starts an escape
sequence, so to introduce a literal \, you either need to prefix your
string with r (r"\foo\bar") or double your backslashes ("\\foo\\bar").
/ works fine on windows, and doesn't require escaping ("/foo/bar").
Depends on your definition of 'fine'.
--> from glob import glob
--> from pprint import pprint as pp
--> pp(glob('c:/temp/*.pdf'))
['c:/temp\\choose_python.pdf',
'c:/temp\\COA.pdf',
'c:/temp\\job_setup.pdf']
Visually ugly, and a pain to compare files and paths.
~Ethan~
--
http://mail.python.org/mailman/listinfo/python-list