예제 #1
0
    def __init__(self, argv=None):
        if notSupported:
            raise notSupported
        if argv is not None:
            self._argv = argv
        if self._argv is _marker:
            self._get_login_shell()
        (pid, fd) = pty.fork()
        if pid == 0:
            self._spawn()
        self._ptyfd = fd
        self._ptypid = pid
        self._new_text = None

        fcntl.fcntl(self._ptyfd, fcntl.F_SETFL, os.O_NDELAY)
        self._termProcess = True
        Buffer.__init__(self, name=self._argv[0], text='')