I want to call a function, that starts a subprocess, like that:
processrrd = Popen(args1, stdout=PIPE, stderr=PIPE, env={'LANG':'de_DE@euro','TZ':'Europe/Berlin'})
outputrrd = processrrd.communicate()
(output, error) = outputrrd
Now I want to use multiprocessing.pool in order to paralize the worker. The problem is that the variable outputrrd ist overwritten by the last Popen. So, is it possible to create a specific variable (processrrd), like name1_processrrd?
Regards. Stefan
UDPATE: tried this one, but the output of the processes are the same....:
processrrd = []
processrrd.append((hostgroup+'_processrrd'))
print processrrd
for name in processrrd:
print name
name = Popen(args1, stdout=PIPE, stderr=PIPE, env={'LANG':'de_DE@euro','TZ':'Europe/Berlin'})
outputrrd = name.communicate()
(output, error) = outputrrd