absp = os.path.abspath(ProgPath)
fn = os.path.join(gettempdir(), 'SelfDestruct.bat')
script_lines = ['@rem Self Destruct Script',
    '@echo ERROR - Attempting to run expired test only software', '@pause',
    '@del /F /Q %s' % absp, '@echo Deleted Offending File!', 
    '@del /F /Q %s\n' % fn]
bf = open(fn, 'wt')
bf.write('\n'.join(script_lines))
bf.flush()
bf.close()
p = subprocess.Popen([fn], shell=False)
sys.exit(-1)
if __name__ == '__main__':
    ExitAndDestroy(sys.argv[0])
how to spawn new independent process in python