Re: determine directories with wildcard

2005-03-08 Thread Thomas Rademacher
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\* > > >

Re: determine directories with wildcard

2005-03-08 Thread Simon Brunning
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

Re: determine directories with wildcard

2005-03-08 Thread Vincent Wehren
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

Re: determine directories with wildcard

2005-03-08 Thread Heiko Wundram
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

Re: determine directories with wildcard

2005-03-08 Thread Diez B. Roggisch
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

determine directories with wildcard

2005-03-08 Thread Thomas Rademacher
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