Message28659
I agree with the fact that this inconsistent behaviour is disturbing.
I tried it with a simple example "lib ", if it exists, we must be able to browse it.
Example: open the idle,
import os
os.path.exists("lib ") ==> True
os.path.listdir('lib ')
Traceback (most recent call last):
File "<pyshell#36>", line 1, in -toplevel-
os.listdir('lib ')
WindowsError: [Errno 3] Le chemin d'accès spécifié est introuvable: 'lib /*.*'
os.stat('lib ') works ...
os.stat(' lib') does not work (that ok to me)
I disagree with the argument that since Windows is bugged then Python is bugged too.
It should be possible to rightstrip the folder name before asking for the resolution of
abspath/the_dir_with_space_at_the_end /*.*
Or to deactivate the rightstriping done on the stat builtin function.
I imagine that this is located in nt builtin module.
I have done it in my own program .. but this should be coded in interfaces modules.
Jerrykhan |
|
Date |
User |
Action |
Args |
2007-08-23 14:40:16 | admin | link | issue1495754 messages |
2007-08-23 14:40:16 | admin | create | |
|