[Python-bugs-list] [ python-Bugs-577191 ] glob returns empty list for 2G+ files
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 11 Jul 2002 08:34:35 -0700
Bugs item #577191, was opened at 2002-07-03 22:41
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577191&group_id=5470
Category: Python Library
Group: Python 2.1.1
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Richard Holmes (rholmes04)
Assigned to: Jeremy Hylton (jhylton)
Summary: glob returns empty list for 2G+ files
Initial Comment:
When trying to use the glob.glob() function on a SINGLE file larger than 2GB in size , it returns an empty
list.
If the file is 2^31-1 then the glob() function works correctly. If wildcard are added to the string it will also
work.
Example:
The directory has 2 files.
big.txt : greather then 2GB
small.txt : less than 2G
1)
list = glob.glob('./big.txt')
print list
[]
2)
list = glob.glob('./small.txt')
print list
['./small.txt']
3)
list = glob.glob('./*.txt')
print list
['./small.txt','./big.txt']
Problem has been observed on python 2.1 on both Solaris 5.7 & Hpux 11.00
----------------------------------------------------------------------
>Comment By: Jeremy Hylton (jhylton)
Date: 2002-07-11 15:34
Message:
Logged In: YES
user_id=31392
Just checked this glob problem is a consequence of the
already reported os.path.exists() problems for large files.
Short of a new Python 2.1 release that includes latest
fixes to posixpath.py, the right answer is to be sure that
you build with large file support enabled.
----------------------------------------------------------------------
Comment By: Jeremy Hylton (jhylton)
Date: 2002-07-04 17:56
Message:
Logged In: YES
user_id=31392
It probably means that Python was compiled without
large file support. Try import test.test_largefile to
check.
If you use 2.1.3 & follow the instrs in the 2.1.3 version
of the lib ref, you should be able to get large file
support working.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=577191&group_id=5470