modules etc

Post new topic   Reply to topic Scripting Resources View previous topic :: View next topic  
Author Message
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Sat Apr 28, 2007 9:43 am    Post subject: modules etc Reply with quote

Hiya...
long time ago Studio 12 showed me how to get info about modules available and commands available in each module... and I forgot, so could anybody shed light on the issue, please?

I have this ditty that went into cyborg:

Code:

if len(chatText)>0 and chatText[0]=="/":
    exec(chatText[1:])
    chatText = ""


could be really helpful to get an overview of commands... cause it is a bit murky what is actually there.
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Studio 12
Site Admin


Joined: 04 Aug 2004
Posts: 67

PostPosted: Sat Apr 28, 2007 7:57 pm    Post subject: Reply with quote

I think this is what your looking for.

/print dir(Module Name)
_________________
Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic.
Back to top
View user's profile Send private message
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Sun Apr 29, 2007 4:12 am    Post subject: Reply with quote

oh hiya Studio, good to hear from you Smile

hm ok that works for manor module... I can see content of it.

but I can't see what modules are available...

I know there is math, string..... and random?

but if I try those it just gives error

/print dir (manor) yes works
/print dir (string) nope

they have to be loaded in room maybe?
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Studio 12
Site Admin


Joined: 04 Aug 2004
Posts: 67

PostPosted: Sun Apr 29, 2007 10:25 am    Post subject: Reply with quote

Hmm odd, I got string to work. any how here is a list of ones i did.
hope this is usefull.


******* string********
['__builtins__', '__doc__', '__file__', '__name__', '_float', '_idmap', '_idmapL', '_int', '_long', 'ascii_letters', 'ascii_lowercase',
'ascii_uppercase', 'atof', 'atof_error', 'atoi', 'atoi_error', 'atol', 'atol_error', 'capitalize', 'capwords', 'center', 'count', 'digits',
'expandtabs', 'find', 'hexdigits', 'index', 'index_error', 'join', 'joinfields', 'letters', 'ljust', 'lower', 'lowercase', 'lstrip', 'maketrans',
'octdigits', 'printable', 'punctuation', 'replace', 'rfind', 'rindex', 'rjust', 'rstrip', 'split', 'splitfields', 'strip', 'swapcase', 'translate',
'upper', 'uppercase', 'whitespace', 'zfill']

********math********
['__doc__', '__name__', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'cosh', 'degrees', 'e', 'exp', 'fabs', 'floor', 'fmod', 'frexp', 'hypot',
'ldexp', 'log', 'log10', 'modf', 'pi', 'pow', 'radians', 'sin', 'sinh', 'sqrt', 'tan', 'tanh']

***** time********
['__doc__', '__name__', 'accept2dyear', 'altzone', 'asctime', 'clock', 'ctime', 'daylight', 'gmtime', 'localtime', 'mktime', 'sleep',
'strftime', 'strptime', 'struct_time', 'time', 'timezone', 'tzname', 'tzset']

******** ramdom *******
['LOG4', 'NV_MAGICCONST', 'Random', 'SG_MAGICCONST', 'TWOPI', 'WichmannHill', '__all__', '__builtins__', '__doc__', '__file__',
'__name__', '_acos', '_cos', '_e', '_exp', '_floor', '_inst', '_log', '_pi', '_random', '_sin', '_sqrt', '_test', '_test_generator',
'betavariate', 'choice', 'cunifvariate', 'expovariate', 'gammavariate', 'gauss', 'getstate', 'jumpahead', 'lognormvariate',
'normalvariate', 'paretovariate', 'randint', 'random', 'randrange', 'sample', 'seed', 'setstate', 'shuffle', 'stdgamma', 'uniform',
'vonmisesvariate', 'weibullvariate']

******* manor ******
['__builtins__', '__doc__', '__file__', '__name__', 'broadcastData', 'clearProps', 'dirtyRect', 'doffProp', 'donProp', 'dropProp',
'face', 'faceColor', 'fetchImage', 'fetchSound', 'fetchSoundObject', 'fetchTextObject', 'fetchTextObjectEx', 'getClientType',
'getIdxRoomUser', 'getIdxSpot', 'getMouseRmPos', 'getRoomName', 'getRoomNumber', 'getRoomUserCount', 'getSiteName',
'getSpotBounds', 'getSpotCount', 'getSpotDest', 'getSpotState', 'getSpotTitle', 'getTopPropID', 'getUserName', 'getUserPos',
'gotoRoom', 'haveProp', 'hitSpot', 'inSpot', 'isKeyDown', 'isLocked', 'isRegistered', 'localMsg', 'lock', 'logErrStr', 'logstr',
'milliseconds', 'mnr', 'mnrenv', 'myGroup', 'myID', 'myRank', 'myRegHash', 'numProps', 'openConnection', 'playSound',
'playSoundObject', 'post', 'putProp', 'regDataReceive', 'removeProp', 'roomMsg', 'say', 'sendData', 'setPos', 'setProp',
'setSpotState', 'setTimer', 'statusMsg', 'stillDown', 'stopSounds', 'tickcount', 'unlock', 'whisper']
_________________
Never be afraid to try something new. Remember, amateurs built the ark, professionals built the Titanic.
Back to top
View user's profile Send private message
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Sun Apr 29, 2007 5:48 pm    Post subject: Reply with quote

Very useful Studio 12, thanks a lot !

odd though I can't call the others up...
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cheiron



Joined: 21 Apr 2005
Posts: 388
Location: Copenhagen, Denmark

PostPosted: Mon Apr 30, 2007 8:08 am    Post subject: Reply with quote

AHA I found out why I could only see content of manor module

they have to be imported in cyborg before you can exec the dir of particular one

just FYI
_________________
Cheiron
______________________________
"Any scientist with respect for himself should start
the day by rejecting his own pet hypotheses".
(Konrad Lorenz)

"Wir müssen wissen
Wir werden wissen"
(David Hilbert)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic All times are GMT - 6 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum