473,612 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

uTidyLib --I'm lost

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\ti dylib\lib.py", line 47
yield n
^
Can someone please clue me in.

-----------------------
James A Roush
jar @ mminternet.com
-----------------------
Jul 18 '05 #1
3 1576
"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

Jul 18 '05 #2
In article <ma************ *************** ******@python.o rg>,
je****@unpython ic.net 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
-----------------------
Jul 18 '05 #3
At some point, james roush <ja*@mminternet .com> 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\ti dylib\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)phy sics(dot)mcmast er(dot)ca
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
985
by: Wade Leftwich | last post by:
I've installed utidylib on Python 2.3, Win2K, using uTidylib-0.1.win32.exe from http://sourceforge.net/projects/utidylib . When I try to import tidy, I get: """ >>> import tidy Traceback (most recent call last): File "<interactive input>", line 1, in ? File "C:\Python23\Lib\site-packages\tidy.py", line 38, in ?
8
1577
by: Gernot Frisch | last post by:
Hi, I get these errors, but I'm totally lost. It's a large cpp file and I don't know where to search for the error, since it does not point to any of my code lines. Can someone suggest where to start? That's my output: d:\Programme\Microsoft Visual Studio .NET 2003\Vc7\include\functional(139) : error C2784: 'bool std::operator
2
1164
by: garyusenet | last post by:
I am working with an application which is based on .net framework, and comes with an SDK. I've installed MS VB 2005 express edition. it seems to open most of the files in the sdk, but it gives some errors and i can't get them to do anything. how do i add functionality to this application built on the .net framework. i've followed the lessons in vb 2005 express but it doesn't
3
1636
by: nogoer | last post by:
Im having an issue with an ecommerce app i just moved to ipower.com hosting. The session is getting lost after 45 seconds. It happens like clockwork as ive timed it at least a dozen times. Ill log into the app then browse to a static content page. Ill then sit there refreshing the page every few seconds until finally the session is lost after 45 seconds. The app had no problems on my development server but now that we moved it to a...
0
1170
by: SM | last post by:
Hello, I have a xml file that contains the CD library of one artist. I want to extract all the tracks from a specific CD. I was able to extract the title of all the cd's but not the tracks of one specific CD. How can i extract track titles from a specific CD? Here's how my code looks like: var xmlResponse = xmlHttp.responseXML; xmlRoot = xmlResponse.documentElement;
6
1187
by: carlos123 | last post by:
Ok i just want to thank you for checking this out and helping me out. This is the problem, well not really problem, but this is what i want to do. I have a bunch of textfields, when the "save" button is pressed, all the information is added to a database which is a bunch of arrays. This is all i have on that. if (event.getSource() == Bok) { firststring = first.getText(); laststring =...
0
958
by: Claire | last post by:
I have built several very simple setup projects where I just install a single application. I am using the installation tools that come with Visual Studio 2005. This setup I want to build has 2 applications, a windows forms proj and a Windows Service proj (which has a project installer added). So far, I have used the setup designer to add an extra dialog to the Start section of the User interface between "Welcome" and "Installation Folder"....
1
1688
by: Boris | last post by:
Hello I'm using debian linux, Python 2.4.4, and utidylib (http:// utidylib.berlios.de/). I wrote simple functions to get a web page, convert it from windows-1251 to utf8 and then I'd like to clean html with it. Here is two pages I use to check my program: http://www.ya.ru/ (in this case everything works ok) http://www.yellow-pages.ru/rus/nd2/qu5/ru15632 (in this case tidy did
17
9308
by: nickels | last post by:
-Alright im supposed to make a program that tests for perfect numbers. I have to use 2 methods and 3 methods if you count the main method. -My first method has to return a boolean value of true or false if the argument is or isn't a perfect number. I found that all perfect numbers either end in a 6 or an 8 so i was thinking i could just use something like... if (value1 % 2 = 0) { value1 = Perfect number } else
0
8162
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8565
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8415
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5532
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4045
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4109
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.