Cookielib in Jython

bieffe62 at gmail.com bieffe62 at gmail.com
Mon Oct 6 10:36:03 EDT 2008


On 6 Ott, 13:19, Felipe De Bene <ttbo... at gmail.com> wrote:
> 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

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



More information about the Python-list mailing list