本文整理汇总了Python中Teleplace.Proxy.Proxy类的典型用法代码示例。如果您正苦于以下问题:Python Proxy类的具体用法?Python Proxy怎么用?Python Proxy使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Proxy类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: initialize3D
def initialize3D(self):
"""Sets up the 3D world, including 3D dictionaries, a base group, and
access to the panel as a 3D object"""
if self.objectDictionary.has_key("___rootObject___") is False:
QBaseGroup(self)
QPanelGroup(self)
QRootGroup(self)
Proxy.send(self, "initialize3D")
示例2: __init__
def __init__(self, panel, tClass, name = None):
"""Initializes the canvas for a given panel.
wClass is the Teleplace class name.
name is a reference id, usually None, which means this is a new
object and a name will be generated.
"""
self.panel = panel
self.tClass = tClass
self.changeAction = None
if(name is None):
self.name = self.panel.generateName()
Proxy.send(self.panel, "makeWidget", tClass, self.name)
else:
self.name = name
panel.objectDictionary[self.name]=self
示例3: saveFilePath
def saveFilePath(self, userID, path, data, fileDesc, fileExt, dialogLabel, callback):
""" Find a file and return the file name
fileDesc - describe the file type
fileExt - a string with all suffexes, separated by ;
dialogLabel - a string with the label for the file dialog"""
self['__saveFileData__'] = data
return Proxy.send(self, "saveFilePath", userID, path, fileDesc, fileExt, dialogLabel, callback)
示例4: __getitem__
def __getitem__(self, key):
"""Implementer of the return value for myValue = self.panel["myKey"]"""
rval = Proxy.send(self, "getItem", key)
if(type(rval)==tuple): #is this a tuple?
if(len(rval)==3): #of length 3?
if(rval[0]=="__sharedObject__" or rval[0]=="__3DObject__"): #a shared Object?
if(self.objectDictionary.has_key(rval[2])): #already loaded?
rval = self.objectDictionary[rval[2]]
else:
rval = eval(rval[1])(self, rval[2])
return rval
示例5: __init__
def __init__(self, panel, tclass, name):
""" initialization of QBasic and most of its sub-classes
panel is the main shared panel object used for communication
tclass is the internal class name of the object
name is typically a dynamically generated shared name between Teleplace and Python
"""
self.panel = panel
self.tClass = tclass
if(name is None):
self.name = Proxy.send(self.panel, "makeNew", self.tClass)
else:
self.name = name
panel.objectDictionary[self.name]=self
示例6: moveTowards
def moveTowards(self, target, amount, distance):
"Move towards the given target by the specified amount"
Proxy.send(self, "moveTowards:amount:distance:", target, amount, distance)
示例7: stopStepping
def stopStepping(self, function):
"Stop stepping the given function"
Proxy.send(self, "stopStepping:", function)
示例8: playSound
def playSound(self, soundName):
"Play the sound with the given name"
Proxy.send(self, "playSound:", soundName)
示例9: translateBy
def translateBy(self, deltaX, deltaY, deltaZ):
"Translate this frame by delta X, Y, and Z"
Proxy.send(self, "translateByX:y:z:", deltaX, deltaY, deltaZ)
示例10: __getattr__
def __getattr__(self, item):
"Query Croquet about this value"
value = Proxy.send(self, "pyGet:", item)
if(value <> None): object.__setattr__(self, item, value)
return value
示例11: schedule
def schedule(self):
Proxy.send(target, "future:invoke:", msecs, self)
示例12: getUserLogin
def getUserLogin(self, uid):
"""Retrieves the login string for a user"""
return Proxy.send(self, "getUserLogin", uid)
示例13: getUserName
def getUserName(self, uid):
"""Retrieves the preferred screen name for a user"""
return Proxy.send(self, "getUserName", uid)
示例14: getUserColor
def getUserColor(self, uid):
"""Retrieves the color for a user"""
return QColor.fromRGBA(Proxy.send(self, "getUserColor", uid))
示例15: getBaseUserName
def getBaseUserName(self):
"""Retrive the _base_ user name - the guy that created and is running the doc"""
return Proxy.send(self, "getBaseUserName")