本文整理匯總了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