[fpc-pascal] Code to send message from Python script to FPC's TSimpleIPCServer

Michalis Kamburelis michalis.kambi at gmail.com
Sun Dec 12 02:13:53 CET 2010

Just sharing, in case someone will find the below information useful,
or worthy to add to some wiki or docs anywhere:

I have here a daemon written in FPC that communicates with clients by
very nice TSimpleIPCServer class (in SimpleIPC unit). Of course it's
trivial to send a message to such server from another FPC program (see
fcl-base/examples/ipcclient.pp). Turns out it's also trivial to send
a message from a Python program. Attaching the Python code. You can
probably easily add alternatives for any other programming language to
this :)

Note that this is specific to Unix, where SimpleIPC just uses a named
pipe, so it looks just like a writeable file (/tmp/server_name) to any
other process. I don't know how it looks for other OSes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-python-ipc-client.py
Type: text/x-python
Size: 997 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20101212/7f584da9/attachment.py>

More information about the fpc-pascal mailing list