Ezio Melotti <ezio.melo...@gmail.com> added the comment:

> 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).

Yes, I tried to run cmd.exe and I did:

C:\> cd D:\foo
C:\> cd E:\foo
C:\> python

os.listdir('D:') and os.listdir('E:') then listed the content of D:\foo
and E:\bar. This is the correct behaviour, even if it's not documented.
The CWD is the one where Python has been launched, and apparently on the
other drives is the root folder by default, if it's not changed with the
cd command.

Thanks Hirokazu for the patch.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5913>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to