Message18561
Behaviour tested in Python 2.3 (final) and 2.3.2 (final).
os.listdir('') and os.listdir(u'') have very different
behaviour across different OSes:
WinXP/WinNT:
os.listdir('') -- current dir (e.g. c:\\python)
os.listdir(u'') -- root dir (e.g. c:\\)
Win98
os.listdir('') -- root dir
os.listdir(u'') -- root dir
Redhat Linux 9.0
os.listdir('') -- OSError
os.listdir(u'') -- OSError
Particularly weird is the WinXP/WinNT behaviour that is
different between unicode and normal strings.
Suggestion for fix: Make os.listdir for empty strings
always
raise an exception or always list the current working
directory.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:17:31 | admin | link | issue818059 messages |
2007-08-23 14:17:31 | admin | create | |
|