march
2007年12月11日 11:32
#libsecondlifeのロード
import clr
clr.AddReferenceToFile("libsecondlife.dll")
import libsecondlife
import time
#ログイン情報の設定
firstName = 'abcd' #苗字
lastName = 'efgh' #名前
passWord = 'ijkl' #パスワード
#初期設定、
client = libsecondlife.SecondLife()
#client.Settings.ENABLE_SIMSTATS = True
#接続
client.Network.Login(firstName, lastName, passWord, '', '')
time.sleep(10)
#実際の処理(SIM統計情報の取得)
sim = client.Network.CurrentSim
attrList = [
#debug-Simulator
'Dilation', #Time Dilation
'FPS', #Sim FPS
'PhysicsFPS', #Physics FPS
'AgentUpdates', #Agent Updates/Sec
'Agents', #Main Agents
'ChildAgents', #Child Agents
'Objects', #Objects
'ScriptedObjects', #Active Objects
'ActiveScripts', #Active Scripts
'LSLIPS', #Script Perf
'INPPS', #Packets In
'OUTPPS', #Packets Out
'PendingDownloads', #Pending Downloads
'PendingUploads', #Pending Uploads
'UnackedBytes', #Total Unacked Bytes
#debug-Simulator-Time(ms)
'FrameTime', #Total Frame Time
'NetTime', #Net Time
'PhysicsTime', #Sim Time (Physics)
'OtherTime', #Sim Time (Other)
'AgentTime', #Agent Time ##'Agent Time' not found. then LET 0.0
'ImageTime', #Images Time
'ScriptTime', #Script Time
]
for i in (attrList):
try:
val = eval('sim.Stats.%s' % (i) )
except AttributeError:
print i, 'AttributeError'
continue
print i, val
#切断
client.Network.Logout()