xmltramp with python2.(4-5)

P

Pradnyesh Sawant

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?
--
warm regards,
Pradnyesh Sawant
--
We are not just our behaviour. We are the person managing our behaviour.
--The One Minute Manager

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHt9bKL6rhPByZNPcRAvGiAJ0bILgKwhHlelijJfLvswDXKWeOPgCgt7T3
MEGjW9uH/gInJLJwggSbnXs=
=ImkJ
-----END PGP SIGNATURE-----
 
J

John Machin

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)
 
P

Pradnyesh Sawant

On Feb 17, 5:40 pm, Pradnyesh Sawant wrote:

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

Hey,
thanks a lot for that reply. it made me realise that xmltramp was something
that is there in '/usr/lib/python2.4/site-packages/xmltramp.pyc' (a
site-package for 2.4), and is hence not available for 2.5
it also showed me that I had _not_ installed it using apt for debian.
unforutnately I dunno where I had got it from, and searching online didn't
give me the result I wanted. anyways, thanks for leading me in the proper
direction :)
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)

--
warm regards,
Pradnyesh Sawant
--
We are not just our behaviour. We are the person managing our behaviour.
--The One Minute Manager

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHuAVzL6rhPByZNPcRAvgpAKCFeytBl206kU1kqyeiuXO7KiegfQCgxcB3
8nYhCG/LH+UEu8MTX5B91TU=
=l+HE
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top