How can i make this work?

Posted by Hairui on Mon 28 Jun 2004 01:15 AM — 3 posts, 17,979 views.

China #0
I just tried to use python in MUSHClient.
I made a alias which name is :
test
and script is:
aDict={}
aDict['Host']='earth'
aDict['port']=80
world.note aDict['port']

All seemed to be well before i typed 'test'

The system cried :
invalid syntax
Line in error:
world.note aDict['port']

can somebody help me to correct it?
Russia #1
1) Python is case-sensitive (I think *shifteye*) so it's:

world.Note


2) All functions in Python can return a value, so it's:

world.Note(aDict['port'])
China #2
Great thanks to Ked.
And thanks to Gammon, finally i can use python to enjoy MUD now.