本文介绍了如何从python脚本中获取字符串值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直致力于创建一个同时使用java和python的小应用程序。 GUI使用java,我想使用一个按钮来调用python脚本,该脚本将字符串返回给java应用程序。问题是我不知道如果在sys.exit()中返回字符串打印到错误流时如何从python返回字符串。
解决方案
I've been working on making a small application which uses both java and python. The GUI uses java and I would like to use a button to call a python script which will return a string to the java application. Problem is I have no idea how to return a string from python as strings are printed to to the error stream if returned in sys.exit().
解决方案
这篇关于如何从python脚本中获取字符串值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!