xmltramp with python2.(4-5)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pradnyesh Sawant

    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)

    iD8DBQFHt9bKL6r hPByZNPcRAvGiAJ 0bILgKwhHlelijJ fLvswDXKWeOPgCg t7T3
    MEGjW9uH/gInJLJwggSbnXs=
    =ImkJ
    -----END PGP SIGNATURE-----

  • John Machin

    #2
    Re: xmltramp with python2.(4-5)

    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)

    Comment

    • Pradnyesh Sawant

      #3
      Re: xmltramp with python2.(4-5)

      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)

      iD8DBQFHuAVzL6r hPByZNPcRAvgpAK CFeytBl206kU1kq yeiuXO7KiegfQCg xcB3
      8nYhCG/LH+UEu8MTX5B91T U=
      =l+HE
      -----END PGP SIGNATURE-----

      Comment

      Working...