2011-09-11 83 views

回答

1

嘗試sendcontrol()從pexpext模塊。

import pexpect 

child = pexpect.spawn ('screen') 
child.sendcontrol('a'); 
child.send('c'); 

documentation有很多例子。

+0

好吧我安裝了pexpect,但我需要一個例子 – acrs