|
Re: Looking for a telnetlib/select package for use in Jython.: msg#00026lang.jython.user
On Thursday 13 February 2003 14:37, Ryan Eberly wrote: <snip java telnet stuff> > > 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? Two ways: - use a wrapper method in python, - return an org.core.python.PyTuple (ie a tuple in Jython) from a java wrapper method. See the Jython Java API docs on how to do this. > The other option might be to rewrite the telnetlib package replace where > select is used. > > Does anyone know if someone has already done this? I don't know. I vaguely recall some talk about implementing the C like python socket using the new async i/o in Java 1.4. Such a socket might be useful. Have fun, Ype ------------------------------------------------------- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Looking for a telnetlib/select package for use in Jython., Ryan Eberly |
|---|---|
| Next by Date: | Overloading !=, A Bewes |
| Previous by Thread: | Re: Looking for a telnetlib/select package for use in Jython., Ryan Eberly |
| Next by Thread: | RE: Looking for a telnetlib/select package for use in Jython., brian zimmer |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |