Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26314

Re: Pass data to a subprocess

Date 2012-07-31 16:46 +0200
From Laszlo Nagy <gandalf@shopzeus.com>
Subject Re: Pass data to a subprocess
References <CAF_E5JY5FgEJub7tNNzZEj0tri8Z7oPZUSLOLtD+5f0t7Yv+Yg@mail.gmail.com> <CAF_E5JY2sEsauXM-teW4hTHePqFCYK6z+9oLMZcjVWFyYs+gKg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2785.1343745980.4697.python-list@python.org> (permalink)

Show all headers | View raw


 > I think I got it now, if I already just mix the start before another 
add, inside the Process.run it won't see the new data that has been 
added after the start. So this way is perfectly safe only until the 
process is launched, if it's running I need to use some 
multiprocess-aware data structure, is that correct?

Yes. Read this:

http://docs.python.org/library/multiprocessing.html#exchanging-objects-between-processes

You can use Queues and Pipes. Actually, these are basic elements of the 
multiprocessing module and they are well documented. I wonder if you 
read the documentation at all, before posting questions here.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Pass data to a subprocess Laszlo Nagy <gandalf@shopzeus.com> - 2012-07-31 16:46 +0200

csiph-web