[Paraview] pvpython multiprocessing

Aurélien Marsan aur.marsan at gmail.com
Fri Feb 18 04:28:15 EST 2011


Hi all,

I would like to use the multiprocessing module of pvpython (paraview 3.8.1
32 bits on windows -- binary release)
But trying to launch several multiprocessing.Process, nothing appen. A new
window with an interpreter is displayed.... but do nothing, even with the
simpliest task.
Is there some limitations about the use of multiprocessing with pvpython ?

Here is the code I use for testing, working well when running with python...
but does nothing with pvpython.

from multiprocessing import Process
import os
import time
def sleeper(name, seconds):
   print 'starting child process with id: ', os.getpid()
   print 'with arg ', name
   print 'sleeping for %s ' % seconds
   time.sleep(seconds)
   print "Done sleeping"

if __name__ == '__main__':
   p = Process(target=sleeper, args=('bob', 5))
   p.start()
   pp = Process(target=sleeper, args=('john', 5))
   pp.start()
   p.join()
   pp.join()


Thanks for help,

Aurélien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110218/86c1e2b0/attachment.htm>


More information about the ParaView mailing list