[IronPython] Error while running sgmllib.py from Python 2.4 library

Martin Maly Martin.Maly at microsoft.com
Thu Feb 16 10:33:59 CET 2006


I don't have the exact file you are running sgmllib on, but based on running on different input (actually, the IronPython tutorial) and consulting the source code, I believe this bug is fixed in 1.0 Beta 3. However, when running the sgmllib on our tutorial as an input, I got different problem down the line and we'll look into that one.

Thank you!
Martin

________________________________

From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of richard hsu
Sent: Monday, February 13, 2006 6:39 PM
To: users at lists.ironpython.com
Subject: [IronPython] Error while running sgmllib.py from Python 2.4 library

Running: IronPython 1.0.2190 (Beta) on .NET 2.0.50727.42

C:\IronPython\Lib>ironpythonconsole sgmllib.py "c:\webhost\index.html"
Traceback (most recent call last):
  File C:\Documents and Settings\user\My Documents\Develop\IronPython\Lib\sgmllib.py, line 511, in Initialize
  File C:\Documents and Settings\user\My Documents\Develop\IronPython\Lib\sgmllib.py, line 506, in test$f38
  File C:\Documents and Settings\user\My Documents\Develop\IronPython\Lib\sgmllib.py, line 95, in feed$f4
  File C:\Documents and Settings\user\My Documents\Develop\IronPython\Lib\sgmllib.py, line 116, in goahead$f7
TypeError: search() takes exactly 2 argument (3 given)

I copied both sgmllib.py and its dependency markupbase.py into the IronPython's Lib directory before running the script. The two files are from Python 2.4 Library. The script runs with python 2.4 and prints out the html tags and data in the console.

Mark Pilgrim's discusses sgmllib.py in Dive Into Python [http://diveintopython.org/html_processing/introducing_sgmllib.html]

My overall objective is to get IronPython to run Mark Pilgrim's feedparser.py [http://feedparser.org]

feedparser.py imports sgmllib, re, sys, copy, urlparse, time, rfc822, types, cgi, urllib, urllib2, CStringIO/StringIO, gzip/zlib, xml.sax, base64, binascii, cjkcodecs.aliases and a few other modules. So, it will be interesting.

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20060216/789d8fce/attachment.html>


More information about the Ironpython-users mailing list