Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > uTidyLib --I'm lost

Reply
Thread Tools

uTidyLib --I'm lost

 
 
james roush
Guest
Posts: n/a
 
      08-03-2003
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.

>>> from tidylib.lib import parse, parseString

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.



-----------------------
James A Roush
jar @ mminternet.com
-----------------------
 
Reply With Quote
 
 
 
 
Jeff Epler
Guest
Posts: n/a
 
      08-04-2003
"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

 
Reply With Quote
 
 
 
 
james roush
Guest
Posts: n/a
 
      08-04-2003
In article <(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> "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
--
-----------------------
James A Roush
jar @ mminternet.com
-----------------------
 
Reply With Quote
 
David M. Cooke
Guest
Posts: n/a
 
      08-04-2003
At some point, james roush <(E-Mail Removed)> wrote:

> 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.
>
>>>> from tidylib.lib import parse, parseString

> 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.)

--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install uTidylib, easy_install problem goldtech Python 1 11-23-2010 12:43 AM
Using utidylib, empty string returned in some cases Boris Python 1 01-23-2008 01:14 AM
uTidylib question.. bruce Python 1 07-12-2006 06:27 AM
Exclusive: Half Life 2 - Lost Coast playtest, screens ... Silverstrand Front Page News 4 09-15-2005 02:30 AM
utidylib won't import Wade Leftwich Python 0 09-03-2003 01:05 AM



Advertisments