[IronPython] Telnet API
mark.john.rees at gmail.com
Wed Sep 27 06:20:13 CEST 2006
Seo has a select module that workes with IronPython, but there are
also other issues with telnetlib relating to how it's uses sys.stdin
which I do not have time to investigate at the moment.
But you could use the following open source assembly as the basis for
a telnet IP library.
The following is an IronPython version of the example they provide:
import De.Mud.Telnet as Telnet
done = False
def on_disconnect(sender, e):
done = True
print "Press <Enter> to quit"
def on_data_available(sender, e):
tn = Telnet.TelnetWrapper()
tn.Disconnected += on_disconnect
tn.DataAvailable += on_data_available
tn.TerminalType = "xterm"
tn.Hostname = "unikorn.css.net"
tn.Port = 23
while not done:
tn.Send(raw_input() + tn.CR)
On 9/27/06, Martin Maly <Martin.Maly at microsoft.com> wrote:
> Telnetlib is a module implemented in Python so ideally IronPython should be
> able to run it. At this point, however, there is a module "select" that
> telnetlib depends on and IronPython doesn't support so IronPython cannot run
> From: users-bounces at lists.ironpython.com
> [mailto:users-bounces at lists.ironpython.com] On Behalf Of
> Yan Manevich
> Sent: Tuesday, September 19, 2006 5:45 PM
> To: users at lists.ironpython.com
> Subject: [IronPython] Telnet API
> I want to connect through Telnet from Windows machine to UNIX machine and
> run some scripts on the last one. My question is if that is possible to work
> with Telnet from IronPython? Is there any API in IronPython like telnetlib
> in Python2.4.3?
> Thank you in advance for you answers.
> users mailing list
> users at lists.ironpython.com
More information about the Ironpython-users