#!/usr/bin/python import os import sys import subprocess import re of=' ' vxif=' ' av=' '.join(sys.argv) res=subprocess.check_output( "vshparse if= of= -v - with " + av, shell=True) #### python does not like a variable name "if" change to "vxif" exec( re.sub("if=", "vxif=", res )) if 'OPT' in locals(): print "vt.py V4 python template" print "if= input file" print "of= output file" print "[-v] verbose mode" exit(0) if 'OPTv' in locals(): optv=1 else: optv=0 os.system("vcp if=" + vxif + " of=" + of )