예제 #1
0
def run_cmd_in_tty(cmd, editor, env, on_finish):
    master, slave = pty.openpty()

    proc = Popen(cmd, stdout=slave, stderr=slave,
        stdin=slave, cwd=editor.project_root, env=env)

    consume_pty(editor, proc, master, on_finish)
예제 #2
0
파일: __init__.py 프로젝트: bigdrum/snaked
def run_cmd_in_tty(cmd, editor, env, on_finish):
    import pty
    from subprocess import Popen
    from snaked.core.console import consume_pty

    master, slave = pty.openpty()

    proc = Popen(cmd, stdout=slave, stderr=slave,
        stdin=slave, cwd=editor.project_root, env=env)

    consume_pty(editor, proc, master, on_finish)