trouble with os.path.exists() and wildcards
Jeremy Fincher
tweedgeezer at hotmail.com
Mon Nov 17 10:17:09 EST 2003
Erik Max Francis <max at alcyone.com> wrote in message news:<3FB8A5B8.3D359C27 at alcyone.com>...
> Fernando Rodriguez wrote:
>
> > How can I check for the xistence of any file that matches a wildcard?
> >
> > For example: ppis-*.iss
> >
> > os.path.exists() doesn't expand the wildcard...
>
> Use glob.glob and then os.path.exists in a loop.
Wouldn't the glob.glob only return files that actually exist?
Jeremy
More information about the Python-list
mailing list