2012-08-14 01:42:43 +00:00
|
|
|
PyJNIus
|
|
|
|
=======
|
|
|
|
|
2012-08-14 13:36:26 +00:00
|
|
|
description
|
|
|
|
-----------
|
|
|
|
|
2012-08-14 01:42:43 +00:00
|
|
|
Python module to access Java class as Python class, using JNI.
|
|
|
|
|
|
|
|
(Work in progress.)
|
2012-08-14 13:36:26 +00:00
|
|
|
|
|
|
|
quick overview
|
|
|
|
--------------
|
|
|
|
|
2012-08-14 13:36:57 +00:00
|
|
|
>>> from jnius.reflect import autoclass
|
|
|
|
>>> autoclass('java.lang.System').out.println('Hello world')
|
|
|
|
Hello world
|
2012-08-14 13:36:26 +00:00
|
|
|
|
2012-08-14 13:36:57 +00:00
|
|
|
>>>Stack = autoclass('java.util.Stack')
|
|
|
|
>>>stack = Stack()
|
|
|
|
>>>stack.push('hello')
|
|
|
|
>>>stack.push('world')
|
|
|
|
>>>print stack.pop()
|
|
|
|
world
|
|
|
|
>>>print stack.pop()
|
|
|
|
hello
|