os.listdir path error

kyosohma at gmail.com kyosohma at gmail.com
Fri Aug 3 16:06:50 EDT 2007


On Aug 3, 2:50 pm, vedrandeko... at v-programs.com 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/
> *.*'
>
> Regards,
> Vedran

I get "SyntaxError: EOL while scanning single-quoted string", which is
what should happen when you escape the double-quotes at the end. Not
sure how you're getting that WindowsErrors.

If I do  os.listdir('c:\python24')  instead, it works fine.

Mike




More information about the Python-list mailing list