Jpython Question

Lars Marius Garshol larsga at ifi.uio.no
Tue Jul 20 16:19:31 EDT 1999


* Ian Kezsbom
| 
| I was just wondering if jpython can instantiate java classes and
| invokes methods on them...any help would be welcome...

It can, and it's very easy too. Here's a snippet from an email I sent
earlier today:

C:\Mine dokumenter>jpython
JPython 1.1beta1 on java1.1.7B
Copyright (C) 1997-1999 Corporation for National Research Initiatives
>>> from java.util import Hashtable
>>> h=Hashtable()
>>> h.put("larsga at ifi.uio.no","Lars Marius Garshol")
>>> h.get("larsga at ifi.uio.no")
'Lars Marius Garshol'
>>>

It's actually as easy as this.

--Lars M.




More information about the Python-list mailing list