• 大小: 1.42M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-01-30
  • 语言: Python
  • 标签: 实例  

资源简介


资源截图

代码片段和文件信息

#!/usr/bin/env python

“““Print all Apple Remote events to stdout.
“““

from __future__ import print_function

__docformat__ = ‘restructuredtext‘
__version__ = ‘$Id: $‘

import pyglet
import sys

window = pyglet.window.Window()


@window.event
def on_draw():
    window.clear()


remote = pyglet.input.get_apple_remote()
if not remote:
    print(‘Apple IR Remote not available.‘)
    sys.exit(0)

remote.open(window exclusive=True)


@remote.select_control.event
def on_press():
    print(‘Press select‘)


@remote.menu_control.event
def on_press():
    print(‘Press menu‘)


@remote.up_control.event
def on_press():
    print(‘Press up‘)


@remote.down_control.event
def on_press():
    print(‘Press down‘)


@remote.left_control.event
def on_press():
    print(‘Press left‘)


@remote.right_contro

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-07-08 01:15  html\
     文件        1973  2019-07-08 01:15  html\warnings.txt
     文件       39794  2019-07-08 01:15  html\index.html
     目录           0  2019-07-08 01:15  html\_sources\
     文件        6173  2019-07-08 00:16  html\_sources\index.txt
     目录           0  2019-07-08 01:15  html\_sources\internal\
     文件        2466  2019-07-08 00:16  html\_sources\internal\contributing.txt
     文件        1154  2019-07-08 00:16  html\_sources\internal\dist.txt
     文件        2904  2019-07-08 00:16  html\_sources\internal\doc.txt
     文件        4253  2019-07-08 00:16  html\_sources\internal\generated.txt
     文件        2353  2019-07-08 00:16  html\_sources\internal\gl.txt
     文件       20087  2019-07-08 00:16  html\_sources\internal\media_logging_manual.txt
     文件        8571  2019-07-08 00:16  html\_sources\internal\media_manual.txt
     文件        4994  2019-07-08 00:16  html\_sources\internal\testing.txt
     文件        4876  2019-07-08 00:16  html\_sources\internal\virtualenv.txt
     文件       14220  2019-07-08 00:16  html\_sources\internal\wraptypes.txt
     目录           0  2019-07-08 01:15  html\_sources\modules\
     文件         872  2019-07-08 00:16  html\_sources\modules\app.txt
     文件         299  2019-07-08 00:16  html\_sources\modules\canvas.txt
     文件         137  2019-07-08 00:16  html\_sources\modules\clock.txt
     文件         137  2019-07-08 00:16  html\_sources\modules\event.txt
     文件         135  2019-07-08 00:16  html\_sources\modules\font.txt
     文件         434  2019-07-08 00:16  html\_sources\modules\gl.txt
     目录           0  2019-07-08 01:15  html\_sources\modules\graphics\
     文件         165  2019-07-08 00:16  html\_sources\modules\graphics\allocation.txt
     文件         283  2019-07-08 00:16  html\_sources\modules\graphics\index.txt
     文件         175  2019-07-08 00:16  html\_sources\modules\graphics\vertexattribute.txt
     文件         169  2019-07-08 00:16  html\_sources\modules\graphics\vertexbuffer.txt
     文件         169  2019-07-08 00:16  html\_sources\modules\graphics\vertexdomain.txt
     目录           0  2019-07-08 01:15  html\_sources\modules\image\
     文件         149  2019-07-08 00:16  html\_sources\modules\image\atlas.txt
............此处省略313个文件信息

评论

共有 条评论