Are there any easy TODO's (such as easy-fix or junior jobs)?

Georg Neis georg at f-451.net
Tue Apr 19 15:24:15 BST 2005


* Martin Pool <mbp at sourcefrog.net> wrote:
> Here is something that might give you an hour of so of fun: at the
> moment the ignore file processing is based on fnmatch, which is close
> but not quite correct.  For example it matches 'a/b/c' with '*', which

Why not use the glob module?  From
<http://docs.python.org/lib/module-glob.html>:

| The glob module finds all the pathnames matching a specified
| pattern according to the rules used by the Unix shell. No tilde
| expansion is done, but *, ?, and character ranges expressed with []
| will be correctly matched. This is done by using the os.listdir()
| and fnmatch.fnmatch() functions in concert, and not by actually
| invoking a subshell. (For tilde and shell variable expansion, use
| os.path.expanduser() and os.path.expandvars().)

Regards, Georg
-- 
Please don't use this document as toilet tissue!




More information about the bazaar mailing list