Python Java桥(CyType /基于CFFI的PyJava)
jtypes.pyjava的Python项目详细描述
当前仅作为占位符(因为基本包jtypes.jvm仍在开发中)
jtypes.pyjava
一个python到java的桥。
概述
jtypes.pyjava is a bridge allowing to use Java classes in regular Python code.jtypes.pyjava is a lightweight Python package, based on the ctypes or cffi library.It is an almost fully compliant implementation of Remi Rampin’s PyJava package by reimplementing whole its functionality in a clean Python instead of C/C++.
关于pyjava:
PyJava is a bridge allowing to use Java classes in regular Python code.It is similar to JPype.It is a C extension that uses JNI to access a Java virtual machine, meaning that it can be used anywhere Python is available. It is not a different interpreter like Jython and does not require anything, other than a JRE. The JVM dynamic library is load dynamically through pyjava.start() (some basic logic for locating this library on major platforms will be provided).
The integration with Java code is meant to be as complete as possible, allowing to use Java and Python objects seemlessly and converting objects back and forth when Java code is called. Furthermore, subclassing Java classes or interfaces in Python code to allow callback from Java is planned for the 0.2 version.
Please note that this extension is still at a very early stage of development and probably shouldn’t be used for anything.
要求
- sun/oracle jre/jdk或openjdk。
安装
先决条件:
- python 2.7或更高版本或3.4或更高版本
- http://www.python.org/
- 2.7和3.6是主要的测试环境。
- pip和setuptools
要安装,请运行:
python -m pip install --upgrade jtypes.pyjava
为了确保一切正常运行,您可以使用:
python -m jt.pyjava.tests
开发
从源安装:
克隆sources并运行:
python -m pip install ./jtypes.pyjava
或开发模式:
python -m pip install --editable ./jtypes.pyjava
先决条件:
开发严格基于tox。要安装它,请运行:
python -m pip install tox
许可证
Copyright (c) 2015-2018 Adam KarpierzLicensed under the MIT LicensePlease refer to the accompanying LICENSE file.
更改日志
0.1.5A9(2018-11-08)
- 更新所需的setuptools版本。
- 小的设置和测试改进。
0.1.5A5(2018-05-22)
- 更新所需的setuptools版本。
0.1.5A4(2018-02-26)
- 改进和简化安装和包装。
0.1.5a3(2018-01-29)
- 开发转移到github。
- 一般改进和更新。
0.0.16A1(2017-05-13)
0.0.15A2(2017-01-03)
- 下一个alpha版本。
0.0.10A1(2016-09-24)
- 第一次阿尔法释放。
0.0.1(2015-10-05)
- 初始版本。