本文整理汇总了Python中system.System.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python System.__init__方法的具体用法?Python System.__init__怎么用?Python System.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system.System
的用法示例。
在下文中一共展示了System.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
self.camip = "sonycam.msgroup.ucla.edu"
self.ourip = socket.gethostbyaddr(socket.gethostname())[-1][0]
self.port = 9218
self.camtool = "./camctrl"
self.pan=0
self.tilt=0
self.zoom=0
self.setCam()
print "Start parsing xml file"
espmlFile = 'sonyCamSystem.xml'
espmlDocObject = espml.parse(espmlFile)
systemElement = espmlDocObject.getSystem()
systemElement.setId('http://'+str(self.ourip)+':'+self.port)
espmlDocObject.export(file(espmlFile, 'w'), 0)
System.__init__(self, self.port, "http://128.97.93.5:1718/", "sonyCamSystem.xml")
print "Registered system"
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例2: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self, engine):
"""Constructor"""
System.__init__(self, engine)
ogre.FrameListener.__init__(self)
ogre.WindowEventListener.__init__(self)
OIS.KeyListener.__init__(self)
OIS.MouseListener.__init__(self)
OIS.JoyStickListener.__init__(self)
self.handlers = [dict() for x in range(InputEvent.NUM)]
self.mouse_handlers = [dict() for x in range(MouseEvent.NUM)]
self.joy_handlers = [dict() for x in range(JoyEvent.NUM)]
self.key_states = {}
self.keys_down = list()
self.mouse_buttons_down = {}
self.mouse_down_pos = {}
self.mouse_down_over = {}
self.mouse_down_modifiers = {}
self.input_locks = {}
for mb in MouseButton.LIST:
self.mouse_buttons_down[mb] = False
self.mouse_down_pos[mb] = None
self.mouse_down_over[mb] = None
self.mouse_down_modifiers[mb] = [False for x in range(Modifier.NUM)]
self.input_locks[mb] = InputLock()
self.mouse_state = None
#box selection
#self.selection_dd_context = self.engine.debugDrawSystem.getContext()
#self.boxSelection = None
#self.maintainDDContext = self.engine.debugDrawSystem.getContext()
self.translation_to_apply = vector3(0,0,0)
self.translation_to_apply_time_left = 0
示例3: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
System.__init__(self, 8081, "http://128.97.93.154:8080/", "sos_system.xml")
# start the SOAP server
self.sossrvClient = sossrv_tools.SossrvClient()
_requests = {'field_getCurrent': {},
'field_average': {},
'sensor_getCurrentValue': {},
'sensor_getAverageValue': {}
}
self.sensorModule = SensorModule()
self.sossrvClient.register_module(self.sensorModule)
# connect to the sossrv application
self.sossrvClient.connect()
SocketServer.TCPServer.__init__(self, ('128.97.93.154', 8082) , ESPRequestHandler)
esphttpserver = thread.start_new_thread(self.serve_forever, ())
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例4: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
System.__init__(self, 7081, "http://128.97.93.154:8080/", "soundscape_system.xml")
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例5: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
System.__init__(self, 7082, "128.97.93.5:1817", "sensorbase_system.xml")
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例6: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
print "Start parsing xml file"
System.__init__(self, 9181, "http://128.97.93.154:8080/", "beachCamSystem.xml")
print "Registered system"
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例7: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
print "Start parsing xml file"
System.__init__(self, 8081, "http://127.0.0.1:8080/", "iTunesSystem.xml")
print "Registered system"
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")
示例8: __init__
# 需要导入模块: from system import System [as 别名]
# 或者: from system.System import __init__ [as 别名]
def __init__(self):
global _requests
print "Start parsing xml file"
System.__init__(self, 9081, "http://128.97.93.154:8080/", "weatherSystem.xml")
print "Registered system"
# start the SOAP server
SocketServer.TCPServer.__init__(self, ('128.97.93.154', 9082) , ESPRequestHandler)
esphttpserver = thread.start_new_thread(self.serve_forever, ())
#the next call is blocking!
print "starting..."
self.start()
raw_input("Press a key when done")