[Tutor] How to connect a MUD client? (fwd)
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Fri Jul 30 19:53:41 CEST 2004
[I'll forward your question to Python-Tutor. Please continue to send your
replies to Tutor, and not directly to me. This allows the other folks an
opportunity to answer your questions, and also allows me to be lazy.
*grin*]
---------- Forwarded message ----------
Date: Fri, 30 Jul 2004 09:14:28 +0100
From: W X Liu <csmwxl at bath.ac.uk>
To: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
Subject: Re: [Tutor] How to connect a MUD client?
Sorry, I am not able to understand "tn.read_very_eager()", could you please
explain it?
W X
>
>
> On Fri, 30 Jul 2004, W X Liu wrote:
>
> > I want to use python to wrote a program to connect a MUD client
> > (mudlib.anarres.org port:5000) and simply show a " hello" on the MUD
> > interface.
>
> Hi W X Liu,
>
>
> You may want to look at telnetlib:
>
>
> http://www.python.org/doc/lib/module-telnetlib.html
>
>
> For example:
>
> ###
> >>> tn = telnetlib.Telnet('mudlib.anarres.org', 5000)
> >>> tn.read_very_eager()
> 'Welcome to Anarres II\r\n\r\nRULES:\r\n1) Code may be distributed only
> with permission from Arren.\r\n2) Do not harass or abuse people.\r\n3) You
> may encounter material which you consider offensive.\r\n\r\nThe official
> address of this MUD is mudlib.anarres.org port 5000.\r\nPlease make SURE
> that you are using that address and not an alias.\r\n\r\nNew users or
> guests may log in with any name.\r\n\r\nWARNING === WARNING === WARNING
> [... text cut]
> ###
>
>
> So you should be able to communicate with your MUD with telnetlib.
>
>
> Good luck to you!
>
>
More information about the Tutor
mailing list