Please Help: xml.parsers.expat question

Markus Schaber markus at schabi.de
Sat Aug 11 22:27:56 CEST 2001


Hi,

Martin von Loewis <loewis at informatik.hu-berlin.de> schrub:

>> for me (using Jython 2.1a1 on java1.3.1 (JIT: null)), the following
>> gives no error:
>> 
>> from xml.parsers import expat
> 
> Are you saying you have a pyexpat in Jython? That's hard to believe...

Well, I just retried it, this is the log of my session:
*******************
schabi at lunix:~$ jython
Java runtime: /usr/bin/java
Classpath: /usr/share/java/jython.jar

Jython 2.1a1 on java1.3.1 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from xml.parsers import expat
Traceback (innermost last):
  File "<console>", line 1, in ?
ImportError: cannot import name expat
>>> from xml.parsers import expat
>>> print expat
<module xml.parsers.expat at 4707691>
>>> 
*********************

It is reproducable - the second try to import doesn't give an error 
message any more.

It seems as yesterday, I thought of a typo causing the first error, and 
retried it. As it seemed to work, I just copy-pasted the command to my 
reply.

I didn't try the module itsself, as I didn't use expat before.

markus
-- 
1) Customers cause problems.
2) Marketing is trying to create more customers.
Therefore:
3) Marketing is evil.  (Grand Edwards in comp.lang.python)



More information about the Python-list mailing list