yes , i works as your advise. Thanks a lot . :-)
On Apr 28, 9:52 am, MRAB goo...@mrabarnett.plus.com wrote:
winterTTr wrote:
I want to list the file with glob .
The path( which is a directory ) is contain square bracket as [ab]
xxx
. However , i can't find how to do it rightly with
I want to list the file with glob .
The path( which is a directory ) is contain square bracket as [ab]
xxx
. However , i can't find how to do it rightly with glob .
with the coding :
{{{
import glob
glob.glob('[ab]xxx' )
}}}
and with the path [ab]xxx really exits.
result : []
Is there a way
winterTTr wrote:
I want to list the file with glob .
The path( which is a directory ) is contain square bracket as [ab]
xxx
. However , i can't find how to do it rightly with glob .
with the coding :
{{{
import glob
glob.glob('[ab]xxx' )
}}}
and with the path [ab]xxx really exits.
result :
New submission from winterTTr winter...@gmail.com:
I want to list the file with glob .
The path( which is a directory ) is contain square bracket as [ab]xxx
. However , i can't find how to do it rightly with glob .
with the coding :
{{{
import glob
glob.glob('[ab]xxx' )
}}}
and with the
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The bug tracker is not here to get help.
Please ask this kind of question on the comp.lang.python newsgroup.
(they will tell you that [ is a special character for glob(), and how to
escape it)
--
nosy: +amaury.forgeotdarc