我在做一个开源项目。特别是this one。在
在readme.md
中,它基本上是说为了开始,做一个名为learntris.py
的空程序。第一步是指示命令行定位learntris.py
文件。在
更深入地解释了here。在
我使用了成功的语法来定位文件并生成输出,但我认为这里有一个问题。根据this page的预期输出如下:
Running test 1: io.q
q : quit
---- sending commands ----
q
---- awaiting results ----
Test 1 passed
Running test 2: io.p
p : print
---- sending commands ----
p
q
---- awaiting results ----
: The 'p' command instructs learntris to print the state
: of the Matrix, the rectangular array of cells in which
: blocks can appear.
:
: The Matrix is 10 cells wide and 22 cells deep, although
: the top two rows are used only for spawning new Tetraminos.
:
: At the start of the game, the Matrix should be empty.
: The 'p' command should indicate empty cells with the
: '.' character.
:
: Cells should be separated by spaces.
:
: Lines should be separated by the standard end of line
: sequence on your operating system (python's "\n").
接下来是剩下的输出。当我运行learntris.py
文件时,我得到的输出完全相同,但只有一个键不同。它说在打印出p commands...
部分之前,权限被拒绝。在
那么为什么这个许可被拒绝了,这对我的输出有什么影响呢?在
你运行测试脚本
testris.py
(你在问题中没有透露这一点,所以我不确定指令是不完整的还是你没有完全遵循它们)要求你在测试真正成功运行你的程序之前做chmod +x ./learntris.py
。在您只需执行一次,只要不从磁盘中删除文件,即使您编辑或以其他方式修改它,execute权限就会保留在那里。在
相关问题 更多 >
编程相关推荐