Java line to JPython (help Obj.class)
Steve Purcell
stephen_purcell at yahoo.com
Tue Jul 4 22:46:49 EDT 2000
tiddlerdeja at m... wrote:
> Can anyone help me turn this java line into JPython?
>
> URL dtdURL = DOMConfigurator.class.getResource("l");
>
> The problem I'm getting is that DOMConfigurator doesn't seem to have
> attribute class.
>
> Is there a workaround?
How about:
dtdURL = DOMConfigurator.getResource('l')
If DOMConfigurator is a Java class, then the JPython object
'DOMConfigurator' is equivalent to the 'DOMConfigurator.class' in
Java.
e.g.,
>>> import java.lang.Object
>>> java.lang.Object
<jclass java.lang.Object at -986770152>
-Steve
--
Steve Purcell, Technical Director, Inkontact
Get in touch at http://www.inkontact.com/
Get testing at http://pyunit.sourceforge.net/
"Life must be simple if I can do it" -- Me
More information about the Python-list
mailing list