Cookielib in Jython

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Felipe De Bene

    Cookielib in Jython

    Hi There,
    I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and
    everything works fine except when I try to import the Standard
    CPython's cookielib. I know this may sound stupid, I could use an
    advice here on what's wrong. Thanks in advance,
    Felipe.

    Output:
    Jython 2.2.1 on java1.6.0_07
    Type "copyright" , "credits" or "license" for more information.
    >>import cookielib
    Traceback (innermost last):
    File "<console>" , line 1, in ?
    ImportError: no module named cookielib
    >>from cookielib import *
    Traceback (innermost last):
    File "<console>" , line 1, in ?
    ImportError: no module named cookielib
    >>from CookieLib import *
    Traceback (innermost last):
    File "<console>" , line 1, in ?
    ImportError: no module named CookieLib
  • bieffe62@gmail.com

    #2
    Re: Cookielib in Jython

    On 6 Ott, 13:19, Felipe De Bene <ttbo...@gmail. comwrote:
    Hi There,
    I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and
    everything works fine except when I try to import the Standard
    CPython's cookielib. I know this may sound stupid, I could use an
    advice here on what's wrong. Thanks in advance,
    Felipe.
    >
    Output:
    Jython 2.2.1 on java1.6.0_07
    Type "copyright" , "credits" or "license" for more information.>>i mport cookielib
    >
    Traceback (innermost last):
      File "<console>" , line 1, in ?
    ImportError: no module named cookielib>>from cookielib import *
    >
    Traceback (innermost last):
      File "<console>" , line 1, in ?
    ImportError: no module named cookielib>>from CookieLib import *
    >
    Traceback (innermost last):
      File "<console>" , line 1, in ?
    ImportError: no module named CookieLib
    Obviously, choockielib is not in your jython installation.
    If this module is a pure python module and not a wrupper of an
    underlying C
    module, you could try simple to get is from a CPython installation,
    try and
    compile it with Jython inside the code. If the module does not use any
    feature
    of the language introduced after Python 2.2, or other unsupported
    modules,
    it could work and you can use it inside your program as it was one of
    your modules.

    HTH
    ----
    FB

    Comment

    • Felipe De Bene

      #3
      Re: Cookielib in Jython

      On Oct 6, 10:36 am, bieff...@gmail. com wrote:
      On 6 Ott, 13:19, Felipe De Bene <ttbo...@gmail. comwrote:
      >
      >
      >
      Hi There,
      I'm trying to run an App I wrote in Python 2.5.2 in Jython 2.2.1 and
      everything works fine except when I try to import the Standard
      CPython's cookielib. I know this may sound stupid, I could use an
      advice here on what's wrong. Thanks in advance,
      Felipe.
      >
      Output:
      Jython 2.2.1 on java1.6.0_07
      Type "copyright" , "credits" or "license" for more information.>>i mport cookielib
      >
      Traceback (innermost last):
        File "<console>" , line 1, in ?
      ImportError: no module named cookielib>>from cookielib import *
      >
      Traceback (innermost last):
        File "<console>" , line 1, in ?
      ImportError: no module named cookielib>>from CookieLib import *
      >
      Traceback (innermost last):
        File "<console>" , line 1, in ?
      ImportError: no module named CookieLib
      >
      Obviously, choockielib is not in your jython installation.
      If this module is a pure python module and not a wrupper of an
      underlying C
      module, you could try simple to get is from a CPython installation,
      try and
      compile it with Jython inside the code. If the module does not use any
      feature
      of the language introduced after Python 2.2, or other unsupported
      modules,
      it could work and you can use it inside your program as it was one of
      your modules.
      >
      HTH
      ----
      FB
      Thanks that worked :D

      Comment

      Working...