Ensure that you have the getch
python module installed pip3 install getch
will work on most computers.
Running tests is as simple at running python -m pytest
not using python -m
will not be able to find the src module.
First, and most importantly, you should always make sure that you are running in a terminal, or read events will not function correctly.
Typing python -m src.repl
will run the repl. It will simulate your input in a vm without setting memory, allowing for
easy iterative testing and programming.
In order to debug your repl, the following commands allow for testing your program easily
memory
will list the memory in bullet pointsaccumulator
will print the current value of the accumulatorquit
will exit the repl, returning you to the shell
Typing python -m src.main {filepath}
will run the virtual machine by loading the given filepath into memory.