PyGTK3 progress bar and multiprocessing
Dear all,
I'm developing a PyGTK3 application (Linux) that copy several files to a server at the same time. Basically, I have a batch of progress bar for each copy. I run each copy in a process using the multiprocessing module. In order to update the progress bar, I passed the object to the function that copy and do a set_fractional but that didn't work. I also tried to pass the value in a list as since it's mutable but still can't get the new value. All multiprocessing examples I find talk about getting results but not about getting individual data during the process run. That's be great if someone could shed some light on this matter to me. Thanks. |
In fact it seems the issue is summarized by the following.
In a python shell I define a function: Code:
>>> def myfct2(n): Code:
N=[None]*4 Now, if I do the same thing in a process it behaves differently: Code:
proc=multiprocessing.Process( target=myfct,args=(N,),daemon=True) |
All times are GMT -5. The time now is 06:08 AM. |