[jython <--> java] static attributes problem

hénon meinrad.recheis at gmx.at
Sun Feb 2 14:08:39 CET 2003


oops. I found out myself. it is in Python Globals.attr1 = None.

regards,
    Meinrad


"hénon" <meinrad.recheis at gmx.at> wrote in message
news:b1iudq$e31$1 at news.tuwien.ac.at...
> hi jpython gurus,
>
> apart from not comletely understanding how class attributes are used in
> python i have annother problem with java.
>
> i created a "public class Globals" in java. this class has several "public
> static" variables.
> i want to access these from several python modules and also from my java
> classes.
>
> in Java accessing them would look like that: Globals.attr1 = null;
> in Jython this code doesn t work: Globals.__class__.attr1 = None
> i get an exception telling me that java.lang.Class has no attr1.
>
> what am i doing here? how to access static variables in java classes?
>
> thanks, Meinrad
>
>






More information about the Python-list mailing list