[issue8402] glob returns empty list with "[" character in the folder name

Shashwat Anand report at bugs.python.org
Thu Apr 15 03:34:36 CEST 2010


Shashwat Anand <anand.shashwat at gmail.com> added the comment:

glob module does not provide what you want.
As a workaround you can try:

os.listdir("c:\abc\afolderwith[test]")

07:02:52 l0nwlf-MBP:Desktop $ ls -R test\[123\]/
1 2 3
>>> os.listdir('/Users/l0nwlf/Desktop/test[123]')
['1', '2', '3']

Changing type to 'Feature Request'

----------
status: pending -> open
type: behavior -> feature request

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8402>
_______________________________________


More information about the Python-bugs-list mailing list