Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > listdir() with mask

Thread Tools

listdir() with mask

Vladimir Rusinov
Posts: n/a

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.

Vladimir Rusinov
GreenMice Solutions: IT-решения на базе Linux
Reply With Quote
Rick Dooling
Posts: n/a
On Dec 14, 1:56 am, "Vladimir Rusinov" <(E-Mail Removed)>

glob or fnmatch

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conversion mask in hex to bit mask Marcin Tyman Ruby 4 05-06-2008 08:15 PM
[networking] Convert subnet mask <=> mask length 187 Perl Misc 2 07-29-2004 10:31 AM
how can I route based on src IP address/mask ? Rick Cisco 6 12-26-2003 07:43 PM
How do I set my subnet mask for this range?? batmon Cisco 5 12-20-2003 12:32 PM
Subnet Mask Help Ste Cisco 16 11-03-2003 05:00 PM