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(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.1.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for BrainpyFuck-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ebbfd11bbb5f9c260ebb0d0f7951d0f54bf7bd40be878dd4e27ea02a0510251 |
|
MD5 | 407c16be37ac7abb443495355b0e0371 |
|
BLAKE2b-256 | f5685e9aacc1c12077eb2a67b14df6ccaa23eef480284dbb4e658bcacc8144b9 |