[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban-beginners] python version (was: Tool proposal: Glossary Assembler)
On 04/14/2011 03:34 AM, Johan Pretorius wrote:
> When I run vocab.py on the Terry the Tiger story, I get this:
> File "vocab.py", line 15
> print(__doc__, file=sys.stderr)
> ^
> SyntaxError: invalid syntax
>
> If I change the "=" to "==", I get:
>
> File "vocab.py", line 66
> except Exception as e:
> ^
> SyntaxError: invalid syntax
>
> I'ts probably because I'm using an old python (v2.5.2). What version are
> you using?
>
> Regards,
> Johan
This code uses the print function, which you can get in python 2.6 if the first
line has the future import for it:
from __future__ import print_function
The exception syntax using the "as" keyword is new in python 2.6, as well.
It looks like the code was written in python 3, though, which would be rather
typical of purpleposeidon.
mu'o mi'e timos
--
You received this message because you are subscribed to the Google Groups "Lojban Beginners" group.
To post to this group, send email to lojban-beginners@googlegroups.com.
To unsubscribe from this group, send email to lojban-beginners+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban-beginners?hl=en.