本文整理汇总了Python中emokit.emotiv.Emotiv.setup方法的典型用法代码示例。如果您正苦于以下问题:Python Emotiv.setup方法的具体用法?Python Emotiv.setup怎么用?Python Emotiv.setup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类emokit.emotiv.Emotiv
的用法示例。
在下文中一共展示了Emotiv.setup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: except
# 需要导入模块: from emokit.emotiv import Emotiv [as 别名]
# 或者: from emokit.emotiv.Emotiv import setup [as 别名]
except (KeyboardInterrupt, SystemExit):
self.stop()
raise
print time.asctime(), "Server Stops - %s:%s" % self.server_address
self.httpd.server_close();
if __name__ == "__main__":
emotiv = Emotiv(display_output=False)
server = HttpEEGDataProvider()
try:
print "starting server and emotiv"
t = threading.Thread(target=server.run)
t.start()
emotiv.setup()
print "closing server and emotiv"
emotiv.close()
server.stop()
except (KeyboardInterrupt, SystemExit) as e:
print e.getMessage()
emotiv.close()
server.stop()
finally:
print "exit now..."
t.join()
print "...really"
示例2: close
# 需要导入模块: from emokit.emotiv import Emotiv [as 别名]
# 或者: from emokit.emotiv.Emotiv import setup [as 别名]
try:
return self.packets.get()
except Exception, e:
print e
def close(self):
if windows:
self.device.close()
else:
self._goOn = False
self.hidraw.close()
if __name__ == "__main__":
try:
a = Emotiv()
a.setup()
except KeyboardInterrupt:
a.close()
gevent.shutdown()
########NEW FILE########
__FILENAME__ = mouse_control
#!/usr/bin/python
import ctypes
from ctypes import cdll
import sys
import platform
import gevent