cross platform method of accessing a running process

Geoff Gerrietts geoff at gerrietts.net
Fri May 17 14:34:21 EDT 2002


Quoting Seth Russell (seth at robustai.net):
> I want to have a python process always running on my machine, but allow cgi
> processes to come in and access that process.  How do I do this in a manner
> that will work on all platforms ?  What python modules will support this?

I might be wrong (don't think I am), but I believe the only way to do
this in a truly cross-platform manner is to do it via sockets. You
open a socket in your long-running process and accept requests. The
SocketServer module is one of your choices.

Some higher-level protocols, like FastCGI, exist. You may find that
FastCGI, or something like XML-RPC, allows you to do the sorts of
things you're looking to do without having to invent a whole protocol
for information exchange. You might also check into Pyro and Twisted;
those frameworks provide some functionality overlapping with what
you're interested in.

More details on what you want will naturally increase the quality of
the answers you receive.

Luck,
--G.

-- 
Geoff Gerrietts             "Overspecialize and you breed in weakness.
<geoff at gerrietts net>     It's slow death." -- Maj. Motoko Kusanagi
http://www.gerrietts.net                          (Ghost in the Shell)





More information about the Python-list mailing list