<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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:])