Transfer data between two separately running python programs.

MDK mdk at mdk.com
Wed Jan 30 12:05:26 EST 2002


This worked great!  Thanks!

"Joshua Muskovitz" <joshm at taconic.net> wrote in message
news:3c51b8ab_1 at corp.newsgroups.com...
> > Using PythonWin32 extensions I have a python program (collector.py) that
> > just monitors the serial port and collects data by running in a
continuous
> > loop.
> >
> > I want to get at that data from a different python program.
>
> A TCP socket would seem like the obvious choice.  Make collector have a
> server socket (in its own thread, most likely).  This will then accept
> connections from one or more (depending on your need) client apps, either
> local or remote (you can refuse connections based on their IP address).
In
> this way, you abstract the serial port nastiness from the final consumer
> app, allowing you more flexibility in the future, should you need it.
>
> --
> # Joshua Muskovitz
> # joshm at taconic.net
> def lyyrs(sig): return '-'.join(sig.split()+["ly y'rs"])
> lyyrs('Hire me!  I need the work!')





More information about the Python-list mailing list