how to run a function/thread in a different terminal window in python?,proc.wait()