Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 Jython 从 Java 中使用 Python 代码,而无需以阻止其在 CPython 中正常工作的方式修改 Python 代码?
如果是,必须采取哪些步骤(在 Java 代码中)?
如果不是,那么(到目前为止)无法做到这一点的原因是什么?
一般来说:大多数纯 Python 代码都应该与 Jython 一起使用 - 但是就像在所有情况下一样:您必须测试、测试、测试。好的书面模块提供单元测试——因此您应该尝试从 Jython 运行测试并查看发生了什么。