xmltramp with python2.(4-5)

Discussion in 'Python' started by Pradnyesh Sawant, Feb 17, 2008.

  1. 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-----
    Pradnyesh Sawant, Feb 17, 2008
    #1
    1. Advertising

  2. Pradnyesh Sawant

    John Machin Guest

    On Feb 17, 5:40 pm, Pradnyesh Sawant <> 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)
    John Machin, Feb 17, 2008
    #2
    1. Advertising

  3. 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)

    iD8DBQFHuAVzL6rhPByZNPcRAvgpAKCFeytBl206kU1kqyeiuXO7KiegfQCgxcB3
    8nYhCG/LH+UEu8MTX5B91TU=
    =l+HE
    -----END PGP SIGNATURE-----
    Pradnyesh Sawant, Feb 17, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xavier
    Replies:
    0
    Views:
    405
    Xavier
    Aug 6, 2003
  2. Skip Montanaro
    Replies:
    1
    Views:
    418
    Thomas Heller
    Aug 7, 2003
  3. Jonas Hei

    Recommendations about xmltramp

    Jonas Hei, Sep 17, 2004, in forum: Python
    Replies:
    5
    Views:
    445
    Istvan Albert
    Sep 18, 2004
  4. snacktime
    Replies:
    13
    Views:
    552
    Dan Sommers
    Feb 22, 2005
  5. Uwe Mayer

    changing from python2.3 to python2.4

    Uwe Mayer, Apr 8, 2005, in forum: Python
    Replies:
    1
    Views:
    290
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 9, 2005
Loading...

Share This Page