On 20/08/12 05:47, john wrote:
print"hello world"#this is just something to say
>>> /Users/jonathan/Documents/hello.py
You don;t run Python scripts from the python prompt. You only type
Python co0mmands there. You could import your file which wiull run it
but the effect is slightly diff
john wrote:
> print "hello world" #this is just something to say
/Users/jonathan/Documents/hello.py
> File "", line 1
> /Users/jonathan/Documents/hello.py
> ^
> SyntaxError: invalid syntax
>
> what am i doing wrong?
The >>> prompt indicates that you have already started the inter
On 08/20/2012 12:47 AM, john wrote:
> print "hello world" #this is just something to say
>
>
>
>
>
/Users/jonathan/Documents/hello.py
> File "", line 1
> /Users/jonathan/Documents/hello.py
> ^
> SyntaxError: invalid syntax
>
> what am i doing wrong?
>
>
>
it would help if you showe
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
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
"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
15 matches
Mail list logo