Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-19 Thread Paul Boddie
On 19 Jan, 17:06, John Nagle <[EMAIL PROTECTED]> wrote: > Paul Boddie wrote: > > Unlike your approach, pprocess employs the fork system call. > > Unfortunately, that's not portable. Python's "fork()" is > "Availability: Macintosh, Unix." I would have preferred > to use "fork()". There was a

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-19 Thread John Nagle
Paul Boddie wrote: > Unlike your approach, pprocess employs the fork system call. Unfortunately, that's not portable. Python's "fork()" is "Availability: Macintosh, Unix." I would have preferred to use "fork()". John Nagle -- http://mail.python.org/mailma

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread Paul Boddie
On 18 Jan, 07:32, John Nagle <[EMAIL PROTECTED]> wrote: > > "Processing" is useful, but it uses named pipes and sockets, > not ordinary pipes. Also, it has C code, so all the usual build > and version problems apply. The pprocess module uses pickles over sockets, mostly because the asynchrono

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread John Nagle
Carl Banks wrote: > On Jan 17, 2:28 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >> It's also necessary to call Pickle's "clear_memo" before each "dump" >> call, since objects might change between successive "dump" calls. >> "Unpickle" doesn't have a "clear_memo" function. It should, because >> i

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread Carl Banks
On Jan 17, 2:28 pm, John Nagle <[EMAIL PROTECTED]> wrote: > It's possible to use "pickle" for interprocess communication over > pipes, but it's not straightforward. > > First, "pickle" output is self-delimiting. > Each dump ends with ".&

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread John Nagle
John Nagle wrote: > Irmen de Jong wrote: >> Christian Heimes wrote: >>> John Nagle wrote: >>>> It's possible to use "pickle" for interprocess communication over >>>> pipes, but it's not straightforward. Another "gotcha".

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread John Nagle
Irmen de Jong wrote: > Christian Heimes wrote: >> John Nagle wrote: >>> It's possible to use "pickle" for interprocess communication over >>> pipes, but it's not straightforward. >> >> IIRC the processing module uses pickle for IPC. May

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread Irmen de Jong
Christian Heimes wrote: > John Nagle wrote: >> It's possible to use "pickle" for interprocess communication over >> pipes, but it's not straightforward. > > IIRC the processing module uses pickle for IPC. Maybe you can get some > idea by readin

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread Christian Heimes
John Nagle wrote: > It's possible to use "pickle" for interprocess communication over > pipes, but it's not straightforward. IIRC the processing module uses pickle for IPC. Maybe you can get some idea by reading its code? http://pypi.python.org/pypi/processing

Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread John Nagle
It's possible to use "pickle" for interprocess communication over pipes, but it's not straightforward. First, "pickle" output is self-delimiting. Each dump ends with ".", and, importantly, "load" doesn't read any characters after the "

Re: Interprocess communication woes

2007-07-20 Thread Murali
ld this program and call it lets say timer ($ g++ -o > > timer timer.cpp) and run it with our python script like this > > > $python test.py "./timer" > > > you would see that every time you run the program your results vary > > and on top of this the stdo

Re: Interprocess communication woes

2007-07-19 Thread Nick Craig-Wood
he timer program gets displayed all > at once presumably when the timer program has completed execution. > > Why this discrepancy between the ping and timer programs? Is my > test.py script correct? Is there a better or a preferred method for > doing interprocess communication in Pyt

Interprocess communication woes

2007-07-18 Thread Murali
you would see that every time you run the program your results vary and on top of this the stdout of the timer program gets displayed all at once presumably when the timer program has completed execution. Why this discrepancy between the ping and timer programs? Is my test.py script correct? Is the

Interprocess communication

2007-07-18 Thread Murali
script correct? Is there a better or a preferred method for doing interprocess communication in Python. Thanks! Murali. -- http://mail.python.org/mailman/listinfo/python-list

Re: Approaches of interprocess communication

2007-02-18 Thread Steve Holden
Donn Cave wrote: > Quoth Steve Holden <[EMAIL PROTECTED]>: > | Ben Finney wrote: > ... > | > If a programmer decides on behalf of the user that "localhost" should > | > be treated specially, that programmer is making an error. > | > | Inter-process TCP/IP communication between two processes on the

Re: Approaches of interprocess communication

2007-02-17 Thread Damjan
> | > If a programmer decides on behalf of the user that "localhost" should > | > be treated specially, that programmer is making an error. > | > | Inter-process TCP/IP communication between two processes on the same > | host invariably uses the loopback interface (network 127.0.0.0). > | According

Re: Approaches of interprocess communication

2007-02-17 Thread Donn Cave
Quoth Steve Holden <[EMAIL PROTECTED]>: | Ben Finney wrote: ... | > If a programmer decides on behalf of the user that "localhost" should | > be treated specially, that programmer is making an error. | | Inter-process TCP/IP communication between two processes on the same | host invariably uses th

Re: Approaches of interprocess communication

2007-02-17 Thread Hendrik van Rooyen
"exhuma.twn" <[EMAIL PROTECTED]> wrote: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. 8< -- sockets,webservices,CORBA,shared memory --- > Supposing both processes

Re: Approaches of interprocess communication

2007-02-16 Thread Nikita the Spider
In article <[EMAIL PROTECTED]>, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. Hi exhuma, That would depend on what data I was exchanging bet

Re: Approaches of interprocess communication

2007-02-16 Thread Goldfish
On Feb 16, 5:11 am, "exhuma.twn" <[EMAIL PROTECTED]> wrote: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > Spring Python makes it easy to get processes talking to each other. You can

Re: Approaches of interprocess communication

2007-02-16 Thread Bjoern Schliessmann
exhuma.twn wrote: > * Sockets >Advantage: Supported per se in nearly every programming >language without even the need to install additional packages >Disadvantage: Lot's of code to write, Who's Lot? :) No, seriously. Why would you think that it's much to write? It can, especially us

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
> About "Linda": Am I right that it looks very similar to "JavaSpaces"? > If yes, are there any funcdamental differences between those two? Yes, they are both linda implementations, but I have no idea what so ever how they compare. A local java expert maybe? -- http://mail.python.org/mailman/list

Re: Approaches of interprocess communication

2007-02-16 Thread Steve Holden
Ben Finney wrote: > "Gabriel Genellina" <[EMAIL PROTECTED]> writes: > >> (And I would expect that making a connection to "localhost" actually >> does *not* go down up to the network card hardware layer, but I >> don't know for real if this is the case or not). > > It damned well better. That's th

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:53, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [XMPP, XML messaging] > Didn't know that. Yet I presume it is pretty awful to manually decompose and > compose the method invocations and parameter sets. It depends on how well you like working with XML, I suppose. > I've got no

Re: Approaches of interprocess communication

2007-02-16 Thread Diez B. Roggisch
Paul Boddie wrote: > On 16 Feb, 14:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: >> >> You can't leave WSDL out of SOAP > > Yes you can, since they're two different things. What you probably > meant was that you can't leave WSDL out of "big architecture", W3C > standards-intensive Web service

Re: Approaches of interprocess communication

2007-02-16 Thread Paul Boddie
On 16 Feb, 14:16, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > > You can't leave WSDL out of SOAP Yes you can, since they're two different things. What you probably meant was that you can't leave WSDL out of "big architecture", W3C standards-intensive Web services. Of course, RPC-style SOAP wit

Re: Approaches of interprocess communication

2007-02-16 Thread Diez B. Roggisch
> Maybe this line of mine was a bit too condensed ;) I fully agree with > you on what you say about CORBA. It's just that for most people IDL > looks a bit out of place. Especially because it resembles C. But once > you actually wrote a few projects using CORBA, you actually begin to > see it's ele

Re: Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
On Feb 16, 1:33 pm, Duncan Grisby <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > > exhuma.twn <[EMAIL PROTECTED]> wrote: > >Supposing you have two separate processes running on the same box, > >what approach would you suggest to communicate between those two > >processes. > > [...]

Re: Approaches of interprocess communication

2007-02-16 Thread Duncan Grisby
In article <[EMAIL PROTECTED]>, exhuma.twn <[EMAIL PROTECTED]> wrote: >Supposing you have two separate processes running on the same box, >what approach would you suggest to communicate between those two >processes. [...] >* Webservices > Advantage: Relatively easy to use, can work across diffe

Re: Approaches of interprocess communication

2007-02-16 Thread Ben Finney
"Gabriel Genellina" <[EMAIL PROTECTED]> writes: > (And I would expect that making a connection to "localhost" actually > does *not* go down up to the network card hardware layer, but I > don't know for real if this is the case or not). It damned well better. That's the entire point of the loopbac

Re: Approaches of interprocess communication

2007-02-16 Thread Ben Finney
"exhuma.twn" <[EMAIL PROTECTED]> writes: > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advantage: Supported per se in nearly every programmi

Re: Approaches of interprocess communication

2007-02-16 Thread Daniel Nogradi
> Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advantage: Supported per se in nearly every programming language > without even the need to ins

Re: Approaches of interprocess communication

2007-02-16 Thread Gabriel Genellina
En Fri, 16 Feb 2007 07:11:36 -0300, exhuma.twn <[EMAIL PROTECTED]> escribió: > Hi all, > > Supposing you have two separate processes running on the same box, > what approach would you suggest to communicate between those two > processes. > > Let me list the ones I know of: > > * Sockets >Advan

Approaches of interprocess communication

2007-02-16 Thread exhuma.twn
Hi all, Supposing you have two separate processes running on the same box, what approach would you suggest to communicate between those two processes. Let me list the ones I know of: * Sockets Advantage: Supported per se in nearly every programming language without even the need to install ad

Re: Interprocess communication on multi-user machine

2006-07-01 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nick Maclaren) wrote: >In article <[EMAIL PROTECTED]>, >Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: >|> > >|> >Sockets are often accessed via special files, but are not files. >|> >|> They are files. They are not _regular_ files. > >Yes, I k

Re: Interprocess communication on multi-user machine

2006-06-30 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: |> > |> >Sockets are often accessed via special files, but are not files. |> |> They are files. They are not _regular_ files. Sigh. Firstly, look at something like: http://www.opengroup.org/onlinepubs/009695399

Re: Interprocess communication on multi-user machine

2006-06-30 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Nick Maclaren) wrote: >In article <[EMAIL PROTECTED]>, >Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: >|> In article <[EMAIL PROTECTED]>, >|> Michael Butscher <[EMAIL PROTECTED]> wrote: >|> >|> >Normally any user could connect to an open sock

Re: Interprocess communication on multi-user machine

2006-06-30 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Michael Butscher <[EMAIL PROTECTED]> writes: |> |> this is not really Python-specific but I need it for Python. |> |> I'm wanting a method for interprocess communication which is OS- |> independent (sockets would be the norma

Re: Interprocess communication on multi-user machine

2006-06-30 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes: |> In article <[EMAIL PROTECTED]>, |> Michael Butscher <[EMAIL PROTECTED]> wrote: |> |> >Normally any user could connect to an open socket on a machine |> >regardless which user established the socket (the user's pr

Re: Interprocess communication on multi-user machine

2006-06-30 Thread Lawrence D'Oliveiro
In article <[EMAIL PROTECTED]>, Michael Butscher <[EMAIL PROTECTED]> wrote: >Normally any user could connect to an open socket on a machine >regardless which user established the socket (the user's program, to be >precise). That's not true. On *nix systems, a socket is a file, and is subject

Re: Interprocess communication on multi-user machine

2006-06-29 Thread Martin v. Löwis
Michael Butscher wrote: > I'm wanting a method for interprocess communication which is OS- > independent (sockets would be the normal way to go), but which works if > multiple users use the machine at the same time so that one user has no > access to the communication of program

Interprocess communication on multi-user machine

2006-06-29 Thread Michael Butscher
Hi, this is not really Python-specific but I need it for Python. I'm wanting a method for interprocess communication which is OS- independent (sockets would be the normal way to go), but which works if multiple users use the machine at the same time so that one user has no access t

Re: Interprocess communication and memory mapping

2005-12-20 Thread Aguilar, James
Paul This is pretty useful for me. Appreciate it! My whole point is not that I actually want to do this, but that I want to make sure that Python is powerful enough to handle this kind of thing before I really invest myself deeply into learning and using it. I do believe that parallel computing

Re: Interprocess communication and memory mapping

2005-12-15 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "James Aguilar" <[EMAIL PROTECTED]> wrote: ... > So, I have a couple of questions: > > * Is there any way to have Python objects (Such as a light or a color) > put themselves into a byte array and then pull themselves out of the > same array without any extra work

Re: Interprocess communication and memory mapping

2005-12-15 Thread Paul Boddie
James Aguilar wrote: > Suppose that I am writing a ray tracer in Python. Well, perhaps not a > ray tracer. Suppose that I am writing a ray tracer that has to update > sixty times a second (Ignore for now that this is impossible and silly. > Ignore also that one would probably not choose Python to

Interprocess communication and memory mapping

2005-12-14 Thread James Aguilar
Oh wise readers of comp.lang.python, Lend a newbie your ears. I have read several old articles from this group about memory mapping and interprocess communication and have Googled the sh** out of the internet, but have not found sufficient to answer my questions. Suppose that I am writing a ray