Reputation: 111
I'm working on an open source project. specifically this one.
In the readme.md
it basically says in order to get started, make an empty program called learntris.py
. The first step is to instruct the command line to locate the learntris.py
file.
It is explained more in depth here.
I used the successful syntax to locate the file and produce output but here's where I think there's a problem. the expected output according to this page is this:
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").
Followed by the rest of the output. When I run the learntris.py
file, I get the exact same output but with one key difference. It says permission denied before printing out the p commands...
part.
Running test 1: io.q
q : quit
---- sending commands ----
q
---- awaiting results ----
/bin/sh: ./learntris.py: Permission denied
Test 1 passed
Running test 2: io.p
p : print
---- sending commands ----
p
q
---- awaiting results ----
/bin/sh: ./learntris.py: Permission denied
: 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").
So why is the permission denied and what kind of effect does this have on my output?
Upvotes: 0
Views: 1580
Reputation: 189387
The way you are running the test script testris.py
(you are not disclosing that in your question so I'm not sure if the instructions are incomplete or if you aren't following them exactly) requires you to do chmod +x ./learntris.py
before the test will actually successfully run your program at all.
You just need to do this once, the execute permission will then stay there as long as you don't remove the file from the disk, even if you edit it or otherwise modify it.
Upvotes: 1