Peter Hansen <[EMAIL PROTECTED]> wrote: > Nils Emil P. Larsen wrote: > > What is the easiest way to make my threaded Python daemon communicate > > with a PHP-script running from Apache2 on localhost? > > "Easiest" of course depends on lots of things, and mostly on > specifics that you haven't told us, and your personal preference. > > Two obvious possibilities that come to mind are "write a file > somewhere from PHP and poll for updates from Python", and > "use sockets (TCP)" or "use UDP".
If the data you want to pass is structured then you might consider XML-RPC which is a cross platform way of passing structured data around. XML-RPC is part of the python standard library (SimpleXMLRPCServer and xmlrpclib) and there seem to be several implementations for PHP http://www.google.co.uk/search?q=xml+rpc+php That might be overkill for what you want though! -- Nick Craig-Wood <[EMAIL PROTECTED]> -- http://www.craig-wood.com/nick -- http://mail.python.org/mailman/listinfo/python-list