mirror of
https://github.com/Relintai/scons_gd.git
synced 2025-03-12 18:38:59 +01:00
17 lines
492 B
Python
17 lines
492 B
Python
"""
|
|
Command wrapper taking arguments, for testing SCons.
|
|
|
|
Writes the command name and argument list to file "wrapper.out",
|
|
then passes the command line on to subprocess.
|
|
No checking is done.
|
|
"""
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
|
|
if __name__ == '__main__':
|
|
path = os.path.join(os.path.dirname(os.path.relpath(__file__)), 'wrapper.out')
|
|
with open(path, 'a') as f:
|
|
f.write("wrapper_with_args.py %s\n" % " ".join(sys.argv[1:]))
|
|
subprocess.run(sys.argv[1:], check=False)
|