File: pty_wrapper.py

package info (click to toggle)
turing 0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,340 kB
  • sloc: python: 106,582; xml: 101; makefile: 53; sh: 29
file content (19 lines) | stat: -rw-r--r-- 476 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys
import os


def pty_wrapper_main():
    """
    Main function of the pty wrapper script
    """
    # make sure we can import _pty even if pyqode is not installed (this is the case in HackEdit where pyqode has
    # been vendored).
    sys.path.insert(0, os.path.dirname(__file__))
    import _pty

    # fixme: find a way to use a pty and keep stdout and stderr as separate channels
    _pty.spawn(sys.argv[1:])


if __name__ == '__main__':
    pty_wrapper_main()