[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.python

xmltramp with python2.(4-5

Pradnyesh Sawant

2/17/2008 6:40:00 AM

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
2 Answers

John Machin

2/17/2008 6:51:00 AM

0

On Feb 17, 5:40 pm, Pradnyesh Sawant <spra...@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)

Pradnyesh Sawant

2/17/2008 9:59:00 AM

0

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/p...

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