xmltramp with python2.(4-5)

John Machin sjmachin at lexicon.net
Sun Feb 17 07:51:06 CET 2008

On Feb 17, 5:40 pm, Pradnyesh Sawant <spra... at gmail.com> wrote:
> Hello,
> I have a code snippet which does 'import xmltramp' to parse an xml file
> received over the network. Also, I have 2 instances of python, namely
> python2.4 and python2.5 on my box. The confusing thing is that the code
> works fine with python2.4, but gives the error:
> ImportError: No module named xmltramp
> when used with python2.5. Why is this ambiguity? Ain't the same PYTHONPATH
> being used for both?

fire up python2.4 interactive prompt
do this:
import sys; sys.path
import xmltramp; xmltramp.__file__

then fire up python2.5 interactive prompt
do this:
import sys; sys.path

If that doesn't give you enough to nut out where xmltramp is and hence
why it's on one sys.path and not on the other, come back with the full
output from the above (including the info that python prints  that
will tell us helpful things like what platform you are on)

More information about the Python-list mailing list