Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Alan Gauld
"Frank Chang" wrote Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3. Here is the program where the Python interpreter complains about NameError: global name 'levenshtein_automata' is not defined. The others have answered the specific question, however I think you have a

Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread bob gailer
See my comment following line 145: On 12/27/2010 8:25 PM, Frank Chang wrote: Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3. Here is the program where the Python interpreter complains about NameError: global name 'levenshtein_automata' is not defined. The python 2,7.

Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Serdar Tumgoren
It appears that you've defined "levenshtein_automata" as a method on your DFA class, but you did not reference the class instance in your call by prefixing "self". Instead, you're trying to call a globally defined function named "levenshtein_automata" -- which because it is not defined, is throwing

[Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Frank Chang
Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3. Here is the program where the Python interpreter complains about NameError: global name 'levenshtein_automata' is not defined. The python 2,7.1 error message is: Traceback (most recent call last): File "automata_test.py"