appending * to glob returns files with '*' !!
Erik Max Francis
max at alcyone.com
Sun Sep 21 22:00:18 EDT 2008
John [H2O] wrote:
> I have a glob.glob search:
>
> searchstring = os.path.join('path'+'EN*')
> files = glob.glob(searchstring)
> for f in files:
> print f
>
>
> ___
> This returns some files:
> EN082333
> EN092334
> EN*
>
> My routine cannot handle the '*' and it should'nt be returned anyway? :-/
>
> A bug?
No, it means you actually have a file named 'EN*' in the directory.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM, Y!M erikmaxfrancis
Many would be cowards if they had courage enough.
-- Thomas Fuller
More information about the Python-list
mailing list