I wanted to thank Steven D'Aprano and Allan Gauld for solving my Python
2.7.1 interpreter question in Tutor Digest Vol. 82 Issue 121. Thank you for
yor help.
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://
Frank Chang wrote:
When I use the Python 2.7.1 interpreter I get the following traceback
:
F:\shedskin\shedskin-0.7>python automata_test2.py
Traceback (most recent call last):
File "automata_test2.py", line 23, in
list(automata.find_all_matches('nice', 1, m))
AttributeError: 'modul
"Frank Chang" wrote
automata.py. The pastebin url for automata.py is:
http://pastebin.com/embed_iframe.php?i=J9MRPibX";
style="border:none;width:100%">
list(automata.find_all_matches('nice', 1, m))
AttributeError: 'module' object has no attribute 'find_all_matches'
find_all_matches() i
I separated my test program into two python files. The first one is
automata.py. The pastebin url for automata.py is:
http://pastebin.com/embed_iframe.php?i=J9MRPibX";
style="border:none;width:100%">
The second file is automata_test2.py. It imports automata.py. The
pastebin url for automat
Alan Gauld wrote:
"Frank Chang" wrote
I apologize for the cut and paste mangling. Is there a better method
than copy-pasting for including 20 or more lines of python source code in
the tutor posts? Thank you.
Long listings are usually better in pastebin - where the indentation is
clear
"Frank Chang" wrote
I apologize for the cut and paste mangling. Is there a better
method
than copy-pasting for including 20 or more lines of python source
code in
the tutor posts? Thank you.
Long listings are usually better in pastebin - where the indentation
is
clear and we get synta
I asked the Shedskin developers about this issue and they are currently
adding support for __call__ . They recommend renaming the class Matcher
__call__ method ,for example as next, and then explicitly call it on line
148 as
lookup_func.next(match).
I followed their suggestion and the Sh
Frank Chang, 28.12.2010 22:35:
Good afternoon. I want to thank everyone who helped me fix the global
name 'levinshtein_automata' is not defined error.
When I run the Shedskin 0.7 Python to C+++ compiler on the
same python program, I receive the error message * Error *
automata_test.py
On 12/28/2010 4:35 PM, Frank Chang wrote:
Good afternoon. I want to thank everyone who helped me fix the
global name 'levinshtein_automata' is not defined error.
When I run the Shedskin 0.7 Python to C+++ compiler on the
same python program, I receive the error message * Error *
autom
"Frank Chang" wrote
When I run the Shedskin 0.7 Python to C+++ compiler on the
same python program, I receive the error message * Error *
automata_test.py:148 : unbound identifier 'lookup_func'. lookup_func
is a
python function pointer passed as an argument to a python function.
I
Good afternoon. I want to thank everyone who helped me fix the global
name 'levinshtein_automata' is not defined error.
When I run the Shedskin 0.7 Python to C+++ compiler on the
same python program, I receive the error message * Error *
automata_test.py:148 : unbound identifier 'lookup_f
"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
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.
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
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"
15 matches
Mail list logo