Author amak
Recipients amak, mitra
Date 2011-07-30.00:06:18
SpamBayes Score 1.05358e-05
Marked as misclassified No
Message-id <>
Unfortunately, as you have discovered, stdin and stdout are not selectable objects on the Java Virtual Machine.

This is a fundamental limitation of java, and thus cannot be solved in jython.

Your only solution is to use channels that *are* selectable in java, and thus jython.

In the current jython implementation, the only selectable IO channels are AF_INET and AF_INET6 sockets.

To make your scenario work, you must

1. Make your parent process open a socket using the "listen" call.
2. Make your child process connect to the parent using the "connect" call.
3. Make the two communicate over that socket.

To see some examples of such client to server communication, between threads, see the Lib/ module.

To see examples of such client to server communications, between processes, see this article

Without knowing more about the nature of the communications between your parent and child, I cannot make any further recommendations. If you want alternative solutions, I suggest a question on the jython-users mailing list, providing more details of your use case.
Date User Action Args
2011-07-30 00:06:19amaksetmessageid: <>
2011-07-30 00:06:19amaksetrecipients: + amak, mitra
2011-07-30 00:06:19amaklinkissue1778 messages
2011-07-30 00:06:18amakcreate