将Python代码打包为jar软件的简单方法
发布时间:2020-05-23 20:12:49 所属栏目:Python 来源:互联网
导读:py写东西快但是java生态广比如大数据py虽然好但是利用不到java的整个的生态的代码
|
py 写东西快 scala 虽然也好但是毕竟 有些库 需要自己写的多 那么 问题来了 那么 问题又来了 py 打包成java 挺麻烦的 官方文档看不懂 答案 有了 timger-mac:test timger$ python ../jytool/jytoollib.py hellojython.py main timger-mac:test timger$ java -jar output.jython.jar *sys-package-mgr*: processing modified jar,'/Users/timger/GitHub/jythontools/jytool/test/output.jython.jar' hello jython timger-mac:test timger$ 整体代码如下 timger-mac:test timger$ java -jar output.jython.jar a a s s s hello jython ['a','a','s','s'] timger-mac:test timger$ cat hellojython.py #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 timger # +Author timger # +Gtalk&Email yishenggudou@gmail.com # +Msn yishenggudou@msn.cn # +Weibo @timger http://t.sina.com/zhanghaibo # +twitter @yishenggudou http://twitter.com/yishenggudou # Licensed under the MIT License,Version 2.0 (the "License"); __author__ = 'timger' import sys def main(): print "hello jython" print sys.argv
(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
