Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

jython can't find standard lib modules

148 views
Skip to first unread message

Gerard Flanagan

unread,
Aug 17, 2007, 5:21:17 AM8/17/07
to
Hello all,

Running a jython script via wsadmin with an `import re` line, the
script fails with

`Import Error: no module named re`

(and similarly for other modules in standard lib)

I can work around by copying the appropriate files from a Python 2.1
distribution to `myjythonlib`, then adding `myjythonlib` to sys.path

eg. import sys; sys.append('/path/to/myjythonlib')

but obviously I'd rather not.

There must be a simple fix, but I can't find any info on this.

Any ideas?

Thanks

Gerard

RaviThoutam

unread,
Oct 11, 2007, 8:05:43 PM10/11/07
to
On Aug 17, 2:21 am, Gerard Flanagan <grflana...@yahoo.co.uk> wrote:
> Hello all,
>
> Running a jython script viawsadminwith an `importre` line, the

> script fails with
>
> `ImportError:nomodulenamedre`
>
> (and similarly for other modules in standard lib)
>
> I can work around by copying the appropriate files from a Python 2.1
> distribution to `myjythonlib`, then adding `myjythonlib` to sys.path
>
> eg.importsys; sys.append('/path/to/myjythonlib')

>
> but obviously I'd rather not.
>
> There must be a simple fix, but I can't find any info on this.
>
> Any ideas?
>
> Thanks
>
> Gerard

Did you find a simpler solution ?

Thanks,
Ravi

0 new messages