simple and fast platform independent IPC

News123 news123 at free.fr
Wed Feb 3 05:46:16 EST 2010


Hi Gabriel,

I'll look at it.
I wasn't aware about named pipes for windows.

bye


N


Gabriel Genellina wrote:
> En Wed, 03 Feb 2010 05:32:58 -0300, News123 <news123 at free.fr> escribió:
> 
>> I'm having a few python scripts all running on the same host (linux or
>> win), which are started manually in random order. (no common parent
>> process)
>> Each process might be identified by an integer (1,2,3) or by a symbolic
>> name ( 'dad' , 'mom' , 'dog' )
>>
>> these scripts want to send short messages to each other ( mostly
>> integers, max a few bytes, short string), which would be enqueued in
>> message queues of the receiving process.
>>
>> example:
>>
>> 'dad' wants to tell 'mom': 'cook'
>> 'dog' wants to tell 'dad' : 'feedme'
>> 'mom' wants to tell 'dad' : 'cookyourself'
> 
> Try using a named pipe between each pair of processes (os.mkfifo + open
> on Linux, open(r"\\.\pipe\desired_name", ...) on Windows)
> 



More information about the Python-list mailing list