Пример #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
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)