Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread wrw
On Nov 3, 2012, at 9:36 PM, Oscar Benjamin wrote: > [byte] > >> >> Bill, I appreciate your comment and have given it much thought, Ramit made >> one much the same the other day. Here lies the potential problem, though it >> might not be one at all, I need to do some experimenting. While I am

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Mark Lawrence
On 04/11/2012 01:05, richard kappler wrote: I notice no one has mentioned asyncore. Is that something I should stay away from? I just started digging through the doc file. regards, Richard If you're really interested read the thread "The Async API of the future" and its derivatives on the Py

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Devin Jeanpierre
On Sat, Nov 3, 2012 at 9:05 PM, richard kappler wrote: > I notice no one has mentioned asyncore. Is that something I should stay away > from? I just started digging through the doc file. Regardless of ones' feelings on it, there is no builtin support for multiprocessing using asyncore. -- Devin

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread richard kappler
>I didn't really understand the above. Is 'manager' some kind of library? > > http://docs.python.org/2/library/multiprocessing.html#managers > > > >Who's Bill? Alan was referring to Twisted that is an event driven > >framework. Event driven or asynchronous processing is a third option > >(after thr

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Oscar Benjamin
On 4 November 2012 01:05, richard kappler wrote: > I notice no one has mentioned asyncore. Is that something I should stay away > from? I just started digging through the doc file. I've only briefly looked at asyncore. I've never heard anyone recommend it: the recommendations for asynchronous pro

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Oscar Benjamin
On 4 November 2012 01:03, richard kappler wrote: > Oscar, that was positively brilliant! Now I get it, I understand how to do > it, and I think this has rearranged my entire plan for the "MCP." If the MCP > is basically just a program that calls several other programs(processes) and > does that bi

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread richard kappler
I notice no one has mentioned asyncore. Is that something I should stay away from? I just started digging through the doc file. regards, Richard -- quando omni flunkus moritati ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscript

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread richard kappler
Oscar, that was positively brilliant! Now I get it, I understand how to do it, and I think this has rearranged my entire plan for the "MCP." If the MCP is basically just a program that calls several other programs(processes) and does that bit of coordination between each, then my life just got meas

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Alan Gauld
On 03/11/12 22:49, Alan Gauld wrote: That's another common pattern - especially in old COOL mainframes! Given my background that may have been a Freudian slip but I did mean COBOL! honest! :-) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ __

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Alan Gauld
On 03/11/12 20:20, richard kappler wrote: SO... while the bot program is running, I would like it to be continuously cognizant of the sensor data and any changes in that data. Let's distill it down to a single sensor to simplify the discussion. If I have a temperature sensor feeding data to the

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread eryksun
On Sat, Nov 3, 2012 at 5:59 PM, Oscar Benjamin wrote: > > how_many_spams = Value('i', 1) > > p1 = Process(target=update_brain) > p2 = Process(target=chat_with_friends) > > p1.start() > p2.start() In Linux you can easily inherit the global Value object in forked processes, but it's not that hard t

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread Oscar Benjamin
On 3 November 2012 20:20, richard kappler wrote: > To all, especially Dave, Oscar and Ramit, thanks for the discussion and > help. Tino, as soon as I have something to put up, I will gladly put it up > on Github. At the moment I only have a few snippets I've written in trying > to learn the variou

Re: [Tutor] running multiple concurrent processes

2012-11-03 Thread richard kappler
To all, especially Dave, Oscar and Ramit, thanks for the discussion and help. Tino, as soon as I have something to put up, I will gladly put it up on Github. At the moment I only have a few snippets I've written in trying to learn the various bits everyone has been helping me with. Just for the re

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread Dave Angel
On 10/30/2012 05:10 PM, richard kappler wrote: > Oscar, thanks for the link, though I must say with all due respect, if it > was "obvious" I wouldn't have had to ask the question. Good link though. I > suspect the reason I didn't find it is I did my searches under threading as > opposed to multi-pr

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread Oscar Benjamin
On 30 October 2012 21:10, richard kappler wrote: > Oscar, thanks for the link, though I must say with all due respect, if it > was "obvious" I wouldn't have had to ask the question. Good link though. I > suspect the reason I didn't find it is I did my searches under threading as > opposed to multi

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread richard kappler
Oscar, thanks for the link, though I must say with all due respect, if it was "obvious" I wouldn't have had to ask the question. Good link though. I suspect the reason I didn't find it is I did my searches under threading as opposed to multi-processing. Dave, no offense taken, great write-up. Now

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread Dave Angel
On 10/30/2012 03:18 PM, richard kappler wrote: > As I sit through the aftermath of Sandy, I have resumed my personal quest > to learn python. One of the things I am struggling with is running multiple > processes. I read the docs on threading and am completely lost so am > turning to the most excel

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread Prasad, Ramit
richard kappler wrote: > As I sit through the aftermath of Sandy, I have resumed my personal quest to > learn python. One of the things I > am struggling with is running multiple processes. I read the docs on > threading and am completely lost so am > turning to the most excellent tutors here (an

Re: [Tutor] running multiple concurrent processes

2012-10-30 Thread Oscar Benjamin
On 30 October 2012 19:18, richard kappler wrote: > As I sit through the aftermath of Sandy, I have resumed my personal quest to > learn python. One of the things I am struggling with is running multiple > processes. I read the docs on threading and am completely lost so am turning > to the most ex

[Tutor] running multiple concurrent processes

2012-10-30 Thread richard kappler
As I sit through the aftermath of Sandy, I have resumed my personal quest to learn python. One of the things I am struggling with is running multiple processes. I read the docs on threading and am completely lost so am turning to the most excellent tutors here (and thanks for all the help, past, pr