PyperCard - 为初学者程序员提供的Python式HyperCard
项目描述
PyperCard - 为初学者程序员提供的Python式HyperCard
通过GitHub pages查看此存储库。
此项目的文档可以在此处找到。
此项目始于2019年,是对Adafruit的CircuitPython PYOA模块的重实现,但用于非CircuitPython计算环境。最初使用Kivy框架进行跨平台开发。在用年轻人士进行教学和学习的伦敦Young Coders' Meetup中成功测试PyperCard后,由于COVID大流行,开发暂停。
然而,PyperCard现在又重新开始了积极开发,并有一些重大变化
- PyScript取代了Kivy,成为生成和运行用户界面的底层跨平台框架。
- Nicholas(PyperCard的原始开发者和维护者)已被Anaconda Inc聘请来工作于PyScript,因此他对这个项目的工作得到了其雇主的赞助(因此发生了版权变更)。
- 代码仓库的所有权已转移到GitHub上的 pyscript 组织(旧代码仓库将自动跳转到新代码仓库)。
- 由于这是一个完整的重写,许可证已从MIT更改为Apache2。
在此仓库中,您仍可以在 旧分支 找到与旧版本项目相关的所有资产。
开发者配置
使用Git克隆仓库
git clone https://github.com/ntoll/pypercard.git
(推荐)升级本地pip
pip install --upgrade pip
创建一个虚拟环境,然后安装需求
pip install -r requirements.txt
大多数有用的开发者相关任务都由一个 Makefile
自动化
$ make
There's no default Makefile target right now. Try:
make clean - reset the project and remove auto-generated assets.
make tidy - tidy up the code with the 'black' formatter.
make lint - check the code for obvious errors with flake8.
make lint-all - check all code for obvious errors with flake8.
make serve - serve the project at: http://0.0.0.0:8000/
make test - while serving the app, run the test suite in browser.
make docs - use Sphinx to create project documentation.
make dist - build the module as a package.
make publish-test - upload the package to the PyPI test instance.
make publish-live - upload the package to the PyPI LIVE instance.
运行测试套件
$ make serve
然后访问 http://localhost:8000/ 并点击“运行测试套件”按钮,或者,在另一个控制台(代码仍在运行)中,使用 make test
。
测试应该在您的浏览器中打开,并通过。;-)
请使用源代码文件的宽度为79个字符。
示例应用程序
在仓库的 examples
子目录中可以找到几个示例应用程序,展示了PyperCard的各个方面。
它们按复杂度顺序排列(简单先)
- hello - 使用PyperCard显示“Hello, world!”
- hello interactive - 一个简单的交互式应用程序,提示用户输入他们的名字,并点击一个按钮来获取友好的问候。
- temperatures - 在摄氏度和华氏度之间转换,同时处理错误。
- card carousel - 在N秒后自动切换到下一张卡片。
- loosey goosey - 一个基于鹅的鸣叫服务应用程序,用于展示PyperCard的音频功能。
- turner - 使用卡片的背景属性来显示Turner的一些画作的全屏图像,并配以巴赫的音乐。
- calculator - 一个简单的计算器,演示了递归单卡片应用程序。
- alchemyst - 一个类似经典Myst的神秘风格的点击式冒险游戏,使用原始HyperCard构建。
项目详情
下载文件
下载您平台上的文件。如果您不确定选择哪个,请了解有关 安装软件包 的更多信息。
源分布
pypercard-0.0.1a8.tar.gz (43.5 MB 查看哈希值)
构建分布
pypercard-0.0.1a8-py3-none-any.whl (23.3 kB 查看哈希值)
关闭
pypercard-0.0.1a8.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 7c8dfb28539ad8421cd5e807ee2bc128b4dc4a75f20f9f3faee2771eb8afed52 |
|
MD5 | 7c0d55d32d8e28f8938a0adf7768c7b0 |
|
BLAKE2b-256 | 9debccbd911e8dca5a2ed7c290d91935b3ad1ef4ddfa9d8564c64b4c6011369a |
关闭
pypercard-0.0.1a8-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b0395ff1511d90861792d3ca418927279e6cbd743b637ec2258400dad78c8f54 |
|
MD5 | e49d706d559349e05beb74f29f4744b3 |
|
BLAKE2b-256 | 7e0225a34e2b03808558dad70e588bca9bf8fe5e57d4bd3d8226b1221f0b0809 |