uTidyLib --I'm lost

J

james roush

I'm tryinh to switch from mx.tidy to uTidyLin and it isn't going well.
So far I can't even import TidyLib. Below is what I get when trying to
import into Idle. I'm using Python 2.1.
Traceback (most recent call last):
File "<pyshell#2>", line 1, in ?
from tidylib.lib import parse, parseString
File "K:\Python21\tidylib\lib.py", line 47
yield n
^


Can someone please clue me in.
 
J

Jeff Epler

"yield" is a new keyword, related to support for generator functions.
It is supported in Python 2.2 with "from __future__ import generators"
and in 2.3 by default. Python 2.1 doesn't support the "yield" keyword.
In short, you need to upgrade your Python to use this module.

Jeff
 
J

james roush

"yield" is a new keyword, related to support for generator functions.
It is supported in Python 2.2 with "from __future__ import generators"
and in 2.3 by default. Python 2.1 doesn't support the "yield" keyword.
In short, you need to upgrade your Python to use this module.

Jeff
Oh. I guess it's to upgrade my Python Installation. Thanks
 
D

David M. Cooke

At some point said:
I'm tryinh to switch from mx.tidy to uTidyLin and it isn't going well.
So far I can't even import TidyLib. Below is what I get when trying to
import into Idle. I'm using Python 2.1.

Traceback (most recent call last):
File "<pyshell#2>", line 1, in ?
from tidylib.lib import parse, parseString
File "K:\Python21\tidylib\lib.py", line 47
yield n
^

because yield (and generators) weren't added until python 2.2. (you'll need
to upgrade.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,083
Messages
2,570,589
Members
47,211
Latest member
JaydenBail

Latest Threads

Top