passing data to a daemon

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Sun Oct 5 11:29:19 EDT 2003


Rob Hunter wrote:
> My problem is: how will I submit jobs to the queue?  The issue is that 
> jobs are generated by users of, say, the operating system, so they 
> aren't a part of the daemon process.  Ideally, I want a way of making a 
> function call to the daemon process *from outside the daemon process*.
> 
> For example, say my daemon has the function in it "addToQueue".  I'd 
> like to write a totally separate piece of Python code that calls this 
> function inside the *running* daemon.

Use Pyro (http://pyro.sourceforge.net)
With only a few (3 to 4) extra lines in your code you're able
to call methods in different Python processes just as if
it was a 'local' method. No network programming needed at all.

Good luck
--Irmen de Jong





More information about the Python-list mailing list