GetRecentLines ()

Posted by Arthur Dent on Thu 20 May 2004 06:33 PM — 3 posts, 17,060 views.

#0
Is the GetRecentLines() method implemented for python. If so, how do I call it?
Australia Forum Administrator #1
Yes, in version 3.48 onwards. See:

http://www.gammon.com.au/mushclient/function.php?searchfor=getrecentlines

You call it by passing the number of recent lines you want and you get back a string containing them. See that page. There is no actual Python example, but it should be easy enough to work out.

All the script functions are available for all scripting languages.
#2
Thanks for your prompt response. I was using 3.45 and upgrading fixed the problem.


The python equivalent to your code example is:

world.Note(world.GetRecentLines(10))