python - simple inter-process communication -
i'm looking simple way pass messages 1 process (perl script, short-lived) (python script, long-running) - both processes local same machine. i've done research, i've found either on head or seemed unnecessarily complex - leaving me bit lost , confused.
i imagine minimal example following:
# listener.py class listener: def __init__(self, port) self.port = port def on_message(self, msg): print "%s: %s" % (timestamp, msg) recipient = listener(1234) # sender.pl sub send_message { ($msg, $port) = @_; # ... } send_message("hello world", 1234);
any pointers on how solve and/or read on appreciated!
in general interested in sockets. place needed rough information documentation of io::socket::inet or more basic socket-stuff in perl perldoc perlipc
Comments
Post a Comment