1.在主进程使用

p.stdin.write("something\n")

要有回车!要有回车!要有回车!

2.在子进程使用

data = raw_input()

读取数据,再用

import sys
print 'something'
sys.stdout.flush()

输出数据,记得要flush!

 

2016.7.25 附:又被坑了一次。。。

 

相关文章:

  • 2021-08-11
  • 2021-06-21
  • 2021-07-08
  • 2022-12-23
  • 2021-08-07
  • 2022-01-06
  • 2022-12-23
猜你喜欢
  • 2021-05-03
  • 2022-12-23
  • 2021-09-20
  • 2022-01-06
  • 2021-06-08
  • 2022-01-01
  • 2021-04-22
相关资源
相似解决方案