啊,实际上这个主题是因为这个问题
现在想使用 pp 模块试一下,代码如下:
cpu_num = 8
job_server = pp.Server(cpu_num)
a = []
for f in file_lists:
a.append(job_server.submit(func_name, (f, ), (fun_1, func_2, ), ('sys', 'datetime', 'pp')))
for x in a:
tmp = x()
提示的错误如下:
An error has occured during the function execution
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/ppworker.py", line 90, in run
__result = __f(*__args)
File "<string>", line 2, in decrypt_file
NameError: global name 'xxx' is not defined
这个 xxx 变量是我在文件开头定义的一个变量,确定已经定义了… 哪位用过这个,对这个比较熟悉