A small brainfuck interpreter for python, including prettyprint inside
Project description
BrainFuckInterpreter
standard usage:
from brainFuckInterpreter.fuck import BrainF
easily get outputs:
for msg in BrainF('yourcodehere'):
print(msg) #msg is what the '.' outputs
or use a comprehension
meg=[i for i in BrainF('yourcodehere') if i]
attributes
in the iterator called BrainF
:
def __init__(self,code,*,print_memory=True, input_func=None, print_func=None)
- print_memory => bool
- input_func => function fot input
- print_func => function for printing memory(is not needed when print_memory is set to False)
PrettyPrint!!!
from brainFuckInterpreter.fuck import prettyprint
prettyprint(ur list representing memory to print, the index of cell (aka element) u want to emphasize)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
BrainpyFuck-0.0.2.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for BrainpyFuck-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14aec7b6a532e4598449a4e5eab87c7c67d049ccf904ae1a4950856bdce8917f |
|
MD5 | eb7acd94b23a33d319e9145fb3a6de0e |
|
BLAKE2b-256 | 12e072cd6d007b1b26a3daababee29ccac96e4996c4d7b645eb98d17cb0217c8 |