This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jerrykhan
Recipients
Date 2007-03-27.11:41:01
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 14:40:16adminlinkissue1495754 messages
2007-08-23 14:40:16admincreate