擅长:python、mysql、java
<p>我不确定快速框架,但在Python中,您可以使用subprocess模块,它生成一个新的子进程,但允许通过stdin/stdout进行通信。在</p>
<p><a href="http://docs.python.org/library/subprocess.html" rel="nofollow noreferrer">http://docs.python.org/library/subprocess.html</a></p>
<p>看一下文档,但那很有用。在</p>
<p>如果要进行轮询,可以使用<a href="http://www.pygtk.org/pygtk2reference/gobject-functions.html#function-gobject timeout-add" rel="nofollow noreferrer">gobject.timeout_add</a>。在</p>
<p>你可以创建一个类似这样的函数:</p>
<pre><code>def mypoller(self):
data = myproc.communicate()
if data[0]: #There's data to read
# do something with data
else:
# Do something else - delete data, return False
# to end calls to this function
</code></pre>
<p>这样你就可以从你的进程中读取数据。在</p>