p = multiprocessing.Process(target=helloconnect, args=(host,"",)) multiprocessing.Process can not start a thread in py2exe it can compile and run without error but it can not run function helloconnect