File: _debugger_case_replace_process.py

package info (click to toggle)
pydevd 3.3.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 13,892 kB
  • sloc: python: 77,508; cpp: 1,869; sh: 368; makefile: 50; ansic: 4
file content (18 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys

if __name__ == '__main__':
    if 'in-sub' not in sys.argv:
        import os
        # These functions all execute a new program, replacing the current process; they do not return.
        # os.execl(path, arg0, arg1, ...)
        # os.execle(path, arg0, arg1, ..., env)
        # os.execlp(file, arg0, arg1, ...)
        # os.execlpe(file, arg0, arg1, ..., env)ΒΆ
        # os.execv(path, args)
        # os.execve(path, args, env)
        # os.execvp(file, args)
        # os.execvpe(file, args, env)
        os.execvp(sys.executable, [sys.executable, __file__, 'in-sub'])
    else:
        print('In sub')
        print('TEST SUCEEDED!')