|
From: Steven M. <sr...@ya...> - 2001-04-02 00:57:18
|
Hello,
I have been trying to run some of the test cases in PyXML with
jython-2.1a1. First, it appears that someone on the PyXML team
is aware of and/or using jython as there is some special case
code to deal with importing. This is great news!
1) However, the 4DOM code appears to be using sys.hexversion to
decide whether unicode is available. Should jython set this by
default? While where at it, what about sys.version_info?
2) For some reason the SECOND occurrence of
xml.sax.make_parser() fails. I have included sample program and
output below.
tia,
Steven Marcus
import sys
print sys.platform
print sys.platform[:4]
try:
print hex(sys.hexversion)
except AttributeError:
print "no sys.hexversion"
try:
print sys.version_info
except AttributeError:
print "no sys.version_info"
from xml.sax import make_parser
parser = make_parser()
print parser
parser = make_parser()
print parser
# OUTPUT:
# java1.3.0
# java
# no sys.hexversion
# no sys.version_info
# <xml.sax.drivers2.drv_xmlproc.XmlprocDriver instance at
1514246354>
# Traceback (innermost last):
# File "info.py", line 28, in ?
# File "/usr/lib/python1.5/site-packages/xml/sax/sax2exts.py",
line 34, in make_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 70, in make_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 38, in _create_parser
# File "/usr/lib/python1.5/site-packages/xml/sax/saxexts.py",
line 74, in _create_parser
# TypeError: __init__() takes at least 2 arguments (1 given)
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/?.refer=text
|