Hari Sekhon wrote:
> import re
> re_regexname = re.compile('abc')
>
> .....
> ..... various function defs
> .....
>
> def func1():
> ...
> func2()
> ...
>
> def func2():
> if re_regexname.match('abc'):
> <do something>
>
> if __name__ == '__main__':
> func1()
The above clearly is not what you have. See the attached version of the
above that works. So - go check for a typo or something like that.
Diez
import re
re_regexname = re.compile('abc')
def func1():
func2()
def func2():
if re_regexname.match('abc'):
print " whohoo!"
if __name__ == '__main__':
func1()
--
http://mail.python.org/mailman/listinfo/python-list