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.
我问了另一个关于加快使用 Perl 和 Monkeyrunner (Jython) 测试 Android 的过程的问题,并得到了这个答案。
启动一个 Monkeyrunner 脚本,获取一个对象,然后循环等待来自 Perl 脚本的数据(当它到来时处理它)似乎是个好主意。但我不知道如何在 Perl 和 Jython (Python) 之间设置某种 IPC。我该怎么做?
只需在您的脚本中使用 stdinmonkeyrunner从您的 perl 脚本中读取命令,这应该会打开一个管道:
monkeyrunner
while True: cmd = raw_input('Enter command: ') if cmd == 'q' or cmd == 'Q': break