Problem with inetd & Python
iwk
iwk_nospam at xs4all_nospam.nl
Wed Nov 28 18:05:12 EST 2001
Hi there,
I've written an M$ Office monitoring add-in which communicates with a
Python script, a SocketServer, running on Linux. Works flawlessly, but I
was wondering whether it would be possible to get it to run under xinetd
or indetd. For no paticular reason, except curiosity and the possibility
of simplified code (it is with C). I went to work and ran into a problem:
According to the little information I found, a process being started by
(x)inetd could use stin & stout to transfer data from and to the client.
And when I telnet to a script which justs writes data to sys.stdout it
works: al data is being displayed on the screen of the telnet client
However, when I try to *read* data from sys.stdin, nothing works
anymore, not even the writing to sys.stdout
So code like:
x = sys.stdin.readline()
while x != '':
sys.stdout.write(x)
x = sys.stdin.readline()
doensn't do a thing.
What am I doing wrong here?
Regards,
Iwan
More information about the Python-list
mailing list