tesseract v5.3.3.20231005
run_with_path Namespace Reference

Functions

def main ()
 

Variables

string SUBST_PATH_ENV_VAR_NAME = "SUBST_PATH"
 

Function Documentation

◆ main()

def run_with_path.main ( )

Definition at line 17 of file run_with_path.py.

17def main():
18 if SUBST_PATH_ENV_VAR_NAME in os.environ:
19 os.environ["PATH"] = os.environ[SUBST_PATH_ENV_VAR_NAME]
20
21 exit_code = subprocess.Popen(sys.argv[1:]).wait()
22
23 # exit_code is negative (-signal) if the process has been terminated by
24 # a signal. Returning negative exit code is not portable and so we return
25 # 100 instead.
26 if exit_code < 0:
27 exit_code = 100
28
29 sys.exit(exit_code)
30

Variable Documentation

◆ SUBST_PATH_ENV_VAR_NAME

string run_with_path.SUBST_PATH_ENV_VAR_NAME = "SUBST_PATH"

Definition at line 15 of file run_with_path.py.