![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archive[Newbie] Referring to a global variable inside a function
From: Ernesto García García <titogarcia_nospamplease_@gmail.com>
Date: Sun Apr 09 2006 - 12:24:51 CEST
Hi experts,
I've built a class for parsing a user-defined list of files and matching
<code>
class LineMatcher:
def __init__(self):
def go(self):
def add_files(self, file_pattern):
def add_action(self, regexp_string, action):
But then, when I try to use my class using actions with "memory" it will
<code>
global count
def line_action(line, match_dictionary):
line_matcher = LineMatcher.LineMatcher()
The error is:
How would you do this?
Regards,
|