[issue5913] On Windows os.listdir('') -> cwd and os.listdir(u'') -> C:\

R. David Murray report at bugs.python.org
Mon May 4 00:22:07 CEST 2009


R. David Murray <rdmurray at bitdance.com> added the comment:

On Sun, 3 May 2009 at 17:36, Antoine Pitrou wrote:
> As for the "C:" behaviour, I think it is normal: you are not specifying
> the path itself, only the drive letter, so it uses the current path in
> the specified drive (which /is/ cwd if you are already running from C:,
> but may be something else if running from another drive).

It is normal behavior for Windows.  Try it with the 'dir' command
in a command window.  (That said, I have no idea, not being a
Windows user, how Windows decides what the 'current' directory
is on any given drive from any given context).

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5913>
_______________________________________


More information about the Python-bugs-list mailing list