Message3961

Author amak
Recipients amak
Date 2008-12-18.17:02:19
SpamBayes Score 0.0015401192
Marked as misclassified No
Message-id <1229619740.83.0.993882663656.issue1211@psf.upfronthosting.co.za>
In-reply-to
Content
Recording a bug to track an issue reported by Shaman Mahmoudi to
jython-users.

From Shaman's email.

http://sourceforge.net/mailarchive/forum.php?thread_name=20769323.post%40talk.nabble.com&forum_name=jython-users
http://www.nabble.com/using-telnetlib-and-its-expect-method-in-jython-td20769323.html#a20769323

----------------------------------------------------------------------------
I am using the latest stable version of jython, version 2.2.1 and I am
trying to write a simple telnet program. However, I am having an issue with
the expect method in it.

Here is my code:

import telnetlib

HOST = 'localhost'
user = 'someone'
password = 'someones password'

tn = telnetlib.Telnet(HOST, 22)

aa, bb, cc = tn.expect(['>>>'], 1)

print aa
print bb
print cc

And this is the error message:

Traceback (innermost last):
 File "/home/qm/workspace/project000/telnettest.py", line 11, in ?
 File "/home/qm/jython/Lib/telnetlib.py", line 623, in expect
 File "/home/qm/jython/Lib/select.py", line 204, in
cpython_compatible_select
 File "/home/qm/jython/Lib/select.py", line 54, in _getselectable
TypeError: ("Object 'java.nio.channels.SocketChannel[connected
local=/127.0.0.1:45293 remote=/127.0.0.1:22]' is not watchable", 88)
----------------------------------------------------------------------------
History
Date User Action Args
2008-12-18 17:02:21amaksetrecipients: + amak
2008-12-18 17:02:20amaksetmessageid: <1229619740.83.0.993882663656.issue1211@psf.upfronthosting.co.za>
2008-12-18 17:02:20amaklinkissue1211 messages
2008-12-18 17:02:20amakcreate