470,604 Members | 2,226 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,604 developers. It's quick & easy.

xmltramp with python2.(4-5)

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)

iD8DBQFHt9bKL6rhPByZNPcRAvGiAJ0bILgKwhHlelijJfLvsw DXKWeOPgCgt7T3
MEGjW9uH/gInJLJwggSbnXs=
=ImkJ
-----END PGP SIGNATURE-----

Feb 17 '08 #1
2 1834
On Feb 17, 5:40 pm, Pradnyesh Sawant <spra...@gmail.comwrote:
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)

Feb 17 '08 #2
On 22:51, 16Feb2008, John Machin wrote:
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)

--
http://mail.python.org/mailman/listinfo/python-list
--
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)

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

Feb 17 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Jakub Moscicki | last post: by
4 posts views Thread by tudor | last post: by
5 posts views Thread by Jonas Hei | last post: by
1 post views Thread by km | last post: by
1 post views Thread by Gurpreet Sachdeva | last post: by
15 posts views Thread by Christopher Taylor | last post: by
6 posts views Thread by samn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.