From: Ryan E. <ry...@pr...> - 2003-02-13 13:34:12
|
----- Original Message ----- From: "Ype Kingma" <yk...@xs...> To: "Ryan Eberly" <ry...@pr...> Sent: Wednesday, February 12, 2003 5:18 PM Subject: Re: [Jython-users] Looking for a telnetlib/select package for use in Jython. > On Wednesday 12 February 2003 17:53, you wrote: > > Hi, > > I'm new to the list, so sorry if I missed any recent posts regarding > > this. > > > > Does anyone know of a implementation of the select package that works with > > jython? Or an implementation of telnetlib that does not use select. > > > > I'm looking to make use of the telnetlib package within Jython, which makes > > use of the select package - unsupported in the standard Jython packages. > > Does this help > http://www.google.com/search?q=java+telnet > ? > > Remember you can use almost any java code in jython. > > Have fun, > Ype > Yes, I have been pursuing this as a solution. However, what I really want is to script telnet in pure python. So the resulting script can either be run imbedded in java with Jython, or directly in Python. The underlying Telnet object could be a java object in Jython, but the method signature would have to match the pure Python version of Telnet. I looked at changing the method signatures on these Java Telnet packages to match the Python telnetlib package. But some of the python Telnet methods return tuples. Is there a way to have a java method return a value that Jython will treat as a tuple? The other option might be to rewrite the telnetlib package replace where select is used. Does anyone know if someone has already done this? Thanks, Ryan |