A lightweight pure python evaluate_brainfuck interpreter and visualizer
Project description
Installation
The package is available on PyPI, as such simply run:
$ pip install brainfuckpy
Usage
Basic can be used by simply providing the command line tool with a brainfuck program. Either by piping it in, by passing it as an argument or by passing a file containing a program. As such these are all valid and equivalent uses:
$ python -m brainfuckpy '++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.'
$ cat hello.bf | python -m brainfuckpy
$ python -m brainfuckpy hello.bf
Additionally, the evaluation may be visualized by adding the -vis
flag.
If more control is required the package also gives access to the underlying functions. In general, passing the program to brainfuckpy.evaluate_brainfuck
should cover 90% of usecases. The other 10% should be solveable by calling brainfuckpy.evaluate_processed
and changing the callbacks it uses (see documentation).
Future development
- Compiling to brainfuck.
- Better documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for brainfuckpy-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bb3122800dab408806d67fbef5948b4cef4474c02ea1736a1b90175b71853e4 |
|
MD5 | 23bcac052a6d93d0dd3b88f9b83b54a1 |
|
BLAKE2b-256 | 94a8357b083ae395fe6d2f00fc568a55b2cdde75f1fe20e310e90e71a9e4448d |