I have a piece of code that does this
retcode = subprocess.call([Vrf.SwitchVrf, tid, vrf], stdout=subprocess.STDOUT, stderr=FNULL)
I import os an