Y
Y
yourisus2016-11-01 16:31:17
Multithreading
yourisus, 2016-11-01 16:31:17

Module has no attribute, how to run attached function?

There is an a.py file:


import multiprocessing as process
import b
...
proc = process.Process(target=b.run(), args=(a,b))
...

b.py

def run(a, b):
return a+b

The task does not matter - an error is dropped here:
AttributeError 'module' object has not attribute 'run'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question