Re: listdir() with mask

2007-12-14 Thread grflanagan
On Dec 14, 2:00 pm, "Vladimir Rusinov" <[EMAIL PROTECTED]> wrote: >Is there any easy way to list files using bash-like patterns? Something like >listfiles("/var/log/*.log"), listfiles("/var/{cache,run}/*"). > On 12/14/07, Jeff McNeil <[EMAIL PROTECTED]> wrote: > > > > > Sure is.. check out the glob

Re: listdir() with mask

2007-12-14 Thread Vladimir Rusinov
On 12/14/07, Jeff McNeil <[EMAIL PROTECTED]> wrote: > > Sure is.. check out the glob module: > http://www.python.org/doc/current/lib/module-glob.html (Official) > http://blog.doughellmann.com/2007/07/pymotw-glob.html (PyMOTW) > Thanks a lot! -- Vladimir Rusinov GreenMice Solutions: IT-решения на

Re: listdir() with mask

2007-12-14 Thread Rick Dooling
On Dec 14, 1:56 am, "Vladimir Rusinov" <[EMAIL PROTECTED]> wrote: glob or fnmatch http://docs.python.org/lib/module-glob.html rd -- http://mail.python.org/mailman/listinfo/python-list

Re: listdir() with mask

2007-12-14 Thread Jeff McNeil
Sure is.. check out the glob module: http://www.python.org/doc/current/lib/module-glob.html (Official) http://blog.doughellmann.com/2007/07/pymotw-glob.html (PyMOTW) Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "cre

listdir() with mask

2007-12-14 Thread Vladimir Rusinov
Hello! Is there any easy way to list files using bash-like patterns? Something like listfiles("/var/log/*.log"), listfiles("/var/{cache,run}/*"). Also, I'll need something like listfiles("/tmp/**/*.tmp"), where ** is unlimited number of folders (like is zsh). Thanks and sorry for my English. --