On 8/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello > > Here is my simple listdir example: > > >>> import os > >>> os.listdir("C:\Python24\") # This directory relly exists > > Here is my error: > > WindowsError: [Errno 3] The system cannot find the path specified: 'l/ > *.*'
That's a somewhat surprising error. Under 2.5, I get a more helpful error message: >>> import os >>> os.listdir("C:\Python25\") SyntaxError: EOL while scanning single-quoted string That's because I've escaped the closing quote of the string with \". Use this instead: >>> os.listdir("C:\\Python25\\") or >>> os.listdir("C:/Python25/") since windows is usually happy to use forward slashes instead of backslashes in directory names. -- Jerry -- http://mail.python.org/mailman/listinfo/python-list