Re: Regexp problem when parsing a string

2010-03-21 Thread MRAB
Alessandro Marino wrote: I'm a beginner and I was trying to write a program to parse recursively all file names in a directory specified as parameter. The problem is that I get a "None" printed to stdout when a file is positively matched. While when the file name doesn't match the regexp the o

Re: Regexp problem when parsing a string

2010-03-21 Thread Steven D'Aprano
On Sun, 21 Mar 2010 19:12:18 +0100, Alessandro Marino wrote: > Could anyone help me to figure out why "None" appears in the putput? I get: "Attachment not shown: MIME type application/octet-stream; filename a.py" Posting attachments to Usenet is tricky. Many newsgroups filter out anything they

Regexp problem when parsing a string

2010-03-21 Thread Alessandro Marino
I'm a beginner and I was trying to write a program to parse recursively all file names in a directory specified as parameter. The problem is that I get a "None" printed to stdout when a file is positively matched. While when the file name doesn't match the regexp the output seems ok. C:\>c:\python