python multiprocessing.Process executes a wrong target (packaged with py2exe) -


i have problem.

i using python(2.7.7, 32bit) , py2exe(0.6.9) on windows7(64bit).

my application structure such following:

from multiprocessing import process  def child():   print "child"  def main():   print "main"   p = process(target=child)   p.start()   p.join()  if __name__ == "__main__":   main() 

(1)result before packaged:

main child 

(2)result after packaged:

main main main ...(forever) 

i want (1) after packaging.

please tell me how (1) after packaging.

love.

as mentioned in comments, need call multiprocessing.freeze_support() when packaging python script executable use on windows. call should come after if __name__ == '__main__': before calling main().

link multiprocessing.freeze docs


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -