python glob and bracket characters ('[]')
- by prosseek
/Users/smcho/Desktop/bracket/[10,20] directory has "abc.txt", but when I run this python code
import glob
import os.path
path1 = "/Users/smcho/Desktop/bracket/\[10,20\]"
pathName = os.path.join(path1, "*.txt")
print glob.glob(pathName)
It returns empty list.
Can't python's glob doesn't handle the bracket letters or others?
Is there any way to solve this problem?