A lightweight pure python 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
File details
Details for the file brainfuckpy-0.2.2.tar.gz
.
File metadata
- Download URL: brainfuckpy-0.2.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7d4df7533e34583d687b2db729de7d040c33acb6c332c46e44ee3955098633e1
|
|
MD5 |
9999577b2806a83ba12e05121f69f40c
|
|
BLAKE2b-256 |
2787cfda7749785f7841ed230b6a06770d266969642823f57cabd8d0ffa6ab81
|
File details
Details for the file brainfuckpy-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: brainfuckpy-0.2.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
cee4a05cbbf72df6bd9f0db28f200ceda9ed2e447c33ddaa9646c6a4335b042d
|
|
MD5 |
d54f3bc89c700c0355176f1d4b77f43e
|
|
BLAKE2b-256 |
d0d6500141758d4f195138cc3ee999a92e5df9abd0bba46c04b055bf63d88358
|