1#! /usr/bin/env python3 2import os 3import sys 4 5TEMPLATE = '''#!/bin/bash 6cd "$(dirname "$0")" 7python3 ../../{script} "$@" 8''' 9 10output_path, script = sys.argv[1:] 11 12with open(output_path, 'w') as f: 13 f.write(TEMPLATE.format(script=script)) 14 15os.chmod(output_path, 0o750) 16