Regexp problem when parsing a string
Alessandro Marino
ale.marino78 at gmail.com
Sun Mar 21 14:12:18 EDT 2010
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.exe g:\a.py sample
====> foo - bar.txt , first part is: foo
None
skipping: foo.txt
Instead I expect an output like this one:
C:\>c:\python.exe g:\a.py sample
====> foo - bar.txt , first part is: foo
None
skipping: foo.txt
Could anyone help me to figure out why "None" appears in the putput?
Thanks and regards,
Ale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100321/44aab485/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.py
Type: application/octet-stream
Size: 448 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20100321/44aab485/attachment.obj>
More information about the Python-list
mailing list