How can i use the Python scripts in MUSH?

Posted by JAN on Sun 10 Aug 2003 01:11 PM — 4 posts, 21,046 views.

#0
I have downloaded the ActivePython binaries, but i do not know how to implement it in MUSH. And the second problem is, where is the documentation for it. I mean the MUSH objects and so on...
Thanx For Help Cidar
USA #1
If installed correctly, then it should automatically be accessible from Mushclient, same as VBScript, Javascript and PerlScript. All you have to do is tell Mushclient that you want it to use Python instead (or just use it in a plugin, which may be better if you are already using scripts in something else, but don't want to recode all of them). As for the built Mushclient commands, they will look like those used in the other languages, since they are independant of the Python system. The only difference is 'how' they are used. It will likely be identical or very similar to the ones used in VBScript. The only thing that may be different is stuff like:

setvariable "name", "value"

Which 'may' require this instead:

setvariable ("name", "value")

I haven't specifically tried coding anything in Python that uses Mushclient commands, so I am not 100% sure which of the above is correct, but as I said, it is going to be one or the other for those types of commands. Others, like getvariable already require the use of () even in VBScript.

Its basically just install, then use. Nothing really complicated about it. However... You might consider creating a desktop folder or using the quick launch tray to store a link to the following file, which contain the actual docs for Python:

Python Manuals - Python22\Doc\index.html

There is also one called Modual Docs, but I am not sure if that is for the main Python or one of the extentions I added on my own system like wxPython. However, it appears to simply be an alternate way to access the existing manuals.
Australia Forum Administrator #2
See MUSHclient documentation.
USA #3
Don't forget to run

C:\Python23\Lib\site-packages\win32comext\axscript\client\pyscript.py