Message30299
OS: Windows 2000 Service Pack 4
Python 2.5
glob.glob() doesn't work in directories named
"[ ]" (with a blank in it). Another example is a
directory named "A - [Aa-Am]"
Example:
#########################
C:\>md []
C:\>md "[ ]"
C:\>copy anyfile.txt []
1 Datei(en) kopiert.
C:\>copy anyfile.txt "[ ]"
1 Datei(en) kopiert.
C:\>python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC
v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for
more information.
>>> import glob
>>> glob.glob ("c:\\[]\*")
['c:\\[]\\anyfile.txt']
>>> glob.glob ("c:\\[ ]\*")
[]
#########################
The second glob should have resulted the same as the
first glob since I copied the same file to both
directories.
I may be wrong because I'm new to python. But I've
tested it a couple of times, and I think it have to be
a bug of python or a bug of windows.
Greets, Koblaid |
|
Date |
User |
Action |
Args |
2007-08-23 14:44:03 | admin | link | issue1580472 messages |
2007-08-23 14:44:03 | admin | create | |
|