jython import search path

Russ uymqlp502 at sneakemail.com
Thu Feb 22 15:03:54 EST 2007


Diez B. Roggisch wrote:

> >> Maybe Jython expert has the perfect answer but til then.
> >>
> >> Did you try:
> >>
> >> sys.path.append('path to search')
> >>
> >> Usually this works if nothing else does.
> >>
> >> -Larry
> >
> > Thanks. That's a good workaround, but I would like to know the
> > "correct" way to do it too if anyone out there knows.
>
> That is pretty much an accepted strategy. Another one is to alter the
> registry file, which has a property python.path. It might even be possible
> to use

Accepted strategy? It doesn't seem very portable. It assumes that
everyone puts their library
modules in the exact same place. Or do they just figure that changing
the sys.path.append
line is easy enough?

> java -Dpython.path=<whatever>

I'm not using Java at all. I just want to generate Java bytecode for
purposes of code analysis
by existing tools.




More information about the Python-list mailing list