来自Java的python [英] python from Java

查看:37
本文介绍了来自Java的python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!


你可以从Java程序调用Python应用程序吗?这需要

安装任何额外的套餐吗?


谢谢


欢呼


-------------------------------------------- --------------------

此消息是使用IMP,Internet Messaging Program发送的。

hi!

can you call a Python application from a Java program? does this require
any additional package to be installed?

thanks

cheers

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

推荐答案

Ajay写道:
Ajay wrote:
嗨!

你可以从Java程序调用Python应用程序吗?这是否需要安装任何其他包?
hi!

can you call a Python application from a Java program? does this require
any additional package to be installed?




看看jython( http://www.jython.org


一切顺利


Fidel。



Have a look at jython (http://www.jython.org)

All the best

Fidel.


[Ajay]
你能从Java程序中调用Python应用程序吗?这是否需要安装任何其他软件包?
can you call a Python application from a Java program? does this require
any additional package to be installed?




通过调用python应用程序定义你的意思。

python代码和java代码是否在同一个进程中?


他们是否在同一台机器上?


他们是在网络上连接的不同机器上?


等等


-

alan kennedy

-------------------------------------------- ----------

电子邮件alan: http ://xhaus.com/contact/alan


嗨!


他们在同一台机器上。

基本上有一个应用程序可以进行一些用户建模,并且它在
Python中。应用程序(一堆.py脚本)有一个界面,你可以用它来访问用户模型。

java app会简单地做一些xml的东西,最后一个它将通过界面访问用户模型。

基本上我想知道的是,如果我有

#test。 py b / b
def foo(等等):

返回blah + = 5

我可以从Java类调用foo吗?更重要的是,我需要在机器上安装
才能做到这一点。有问题的机器是一台PDA,所以对于可安装和运行的机器有一些限制

就可以了。 Python运行,Java也运行。


欢呼


引用Alan Kennedy< al **** @ hotmail.com>:
hi!

they are on the same machine.
basically there is an application that does some user modelling and its in
Python. the application (bunch of .py scripts) have an interface that you
use to access user models.
the java app will simply do some xml stuff at the end of which it will
access the user model through the interface.
basically what i''d like to know is if i have
#test.py
def foo(blah):
return blah += 5

can i call foo from a Java class? more importantly what would i need to
install on the machine to be able to do that. the machine in question is a
PDA so there are some limitations on what can be installed and made to run
on it. Python runs and so does Java.

cheers

Quoting Alan Kennedy <al****@hotmail.com>:
[Ajay]
您可以从Java程序调用Python应用程序吗?这个
can you call a Python application from a Java program? does this


需要

要安装的任何其他软件包吗?
any additional package to be installed?



通过调用python应用程序来定义你的意思。 。

python代码和java代码是否在同一个进程中?

它们是否在同一台机器上?

它们是否在不同的机器上连接在网络上?

等等

-
阿兰肯尼迪
-------------- ----------------------------------------
电子邮件alan: http://xhaus.com/contact/alan
-
http://mail.python.org/mailman/listinfo/python-清单



--------------------------------- -------------------------------

此邮件是使用IMP(Internet Messaging Program)发送的。


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


这篇关于来自Java的python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆