python multiprocess fails to start

后端 未结 2 1162
甜味超标
甜味超标 2021-01-16 05:09

Here is my code for a simple multiprocessing task in python

from multiprocessing import Process

def myfunc(num):

    tmp = num * num
    print \'squared O/         


        
2条回答
  •  别那么骄傲
    2021-01-16 05:32

    Save the code above into a .py file and then run it in a gnome-terminal with

    python myfile.py
    

    Where "myfile.py" is the filename you saved to.

    I would assume that the IDE you are using is confused somehow by Process()

提交回复
热议问题