From: Ype Kingma <ykingma@...>
> Alexander,
>
> >Hi,
> >
> >Is it possible to use PyChecker from Jython? If it can't check Java classes,
how can I make PyChecker ignore Java packages? I'have played around some with
the blacklist PyChecker option but I'm still getting import errors and
PyChecker doesn't check my python code. Even if I wrap all Java class access
into another python module, PyChecker still complains that it can't find the
indirectly imported Java packages and quits without checking anything.
> >
> >Any help would be very much appreciated.
>
> PyChecker does most of it's work by checking the python byte codes generated
by
> the CPython compiler.
sadly true.
> Jython compiles to java byte codes and these cannot be checked by
> PyChecker used from jython.
>
> Your best bet is to use PyChecker from CPython and have it analyze
> your Jython modules. This means that PyChecker will fail to load
> java byte code modules, but at least your python code should be checked.
>
> I don't know how PyChecker deals with modules it can't find.
>
AFAIK the first thing it does with
an analyzed module is trying to plainly import it,
if the module references something that cannot be
imported, PyChecker dies.
I care about these issues with PyChecker, and I have ideas
and plans to make it work with Jython. Clearly
a different approach by PyChecker would make
everybody's life easier, OTOH with open source
projects everybody has legitimately his own agenda.
So what I'm planning are huge hacks and nobody
should hold his breath <wink>.
regards, Samuele Pedroni.
|