DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Manipulate Files And Directory Easily With (on Pys60)

  • submit to reddit
        I really like Jason Orendorff's <a href=></a>.
So, I modify it a bit to use with pys60.
- don't load fnmatch, glob, codecs
- remove some functionalities and some docstrings
- match wildcard with regexp simplisticly
#return fnmatch.fnmatch(, pattern)

# poor man's fnmatch
pattern = pattern.replace('.', '\\.').replace('*','.*').replace('?','.')
return re.match(pattern,
But most of it works nicely. Please report bugs in comments.
Download it here <a href=></a>.