Thanks. It works fine! Thomas
"Vincent Wehren" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Thomas Rademacher wrote:
> > Hello,
> >
> > I want to collect with the wildcard '*' all existing directories.
> > For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
> >
>
On Tue, 8 Mar 2005 14:33:59 +0100, Thomas Rademacher
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I want to collect with the wildcard '*' all existing directories.
> For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How about something like:
import fnmatch
import os
root = 'd:\\'
filt
Thomas Rademacher wrote:
Hello,
I want to collect with the wildcard '*' all existing directories.
For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How can I resolve this problem?
Thanks for your hints, Thomas.
You may want to check out the glob module. E.g. something like:
>> impor
On Tuesday 08 March 2005 14:33, Thomas Rademacher wrote:
> How can I resolve this problem?
python
>>> import glob
>>> help(glob)
or look at the online documentation for glob.
--
--- Heiko.
pgp6MyvJSQxu3.pgp
Description: PGP signature
--
http://mail.python.org/mailman/listinfo/python-list
Thomas Rademacher wrote:
> Hello,
>
> I want to collect with the wildcard '*' all existing directories.
> For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
>
> How can I resolve this problem?
This is some sort of pattern matching. What I'd do is to convert your
pattern to a regex
Hello,
I want to collect with the wildcard '*' all existing directories.
For example: /dir/dir/*/dir/*/dir/* or C:\dir\dir\*\dir\*\dir\*
How can I resolve this problem?
Thanks for your hints, Thomas.
--
http://mail.python.org/mailman/listinfo/python-list