os.path and Windows UNC paths

David LeBlanc whisper at oz.net
Wed Jul 10 15:23:14 EDT 2002


<snip>
> As an aside;
>
> using os.path.isdir(r'\\server\share\') results in a complaint of
> invalid token - I thought the r prefix meant use raw string, so why the
> error ?

the trailing \ is escaping the ending ' of the r'...' string. I just ran
across the caution about having odd numbers of \ at the end of an r'...'
string last evening.

HTH,

Dave LeBlanc
Seattle, WA USA






More information about the Python-list mailing list