摘要: 将下列Python代码保存成VitrualCom.py:#! /usr/bin/env python#coding=utf-8import ptyimport osimport selectdef mkpty(): # 打开伪终端 master1, slave = pty.openpty() slaveName1 = os.ttyname(slave) master2, slave = pty.openpty() slaveName2 = os.ttyname(slave) print '\nslave device names: ', slaveName1... 阅读全文
posted @ 2014-02-23 16:15 摇一摇 阅读(4841) 评论(0) 推荐(0) 编辑