Pathing question on Windows
Emile van Sebille
emile at fenx.com
Fri Jan 18 16:46:34 EST 2002
From: "Tony Love" <Tony.Love at alcatel.com>
> I am running Python2.1 on WinNT and I would like to know how (if it is
> indeed possible) to use UNC nameing conventions instead of drive
> letters. By UNC nameing I mean the format
> \\servername\share\path\filename instead of H:\path\filename . I
> know that simply useing a UNC path fails but I was wondering if there
> is a module or a syntax trick that I can employ to use the UNC paths.
Works here...
>>> target = r"\\fcme\Zope"
>>> import os
>>> os.listdir(target)
['v2.4']
Perhaps you're not using a raw string or escaping the backslashes?
--
Emile van Sebille
emile at fenx.com
---------
More information about the Python-list
mailing list