Skip to main content

brainfuck.py

PyPI version Monthyly Pypi Installs Tests GitHub license

A simple lightweight pure python brainfuck interpreter and visualizer.

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

Metadata

Release files for brainfuckpy 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for brainfuckpy 0.2.2
File Size Uploaded
brainfuckpy-0.2.2.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for brainfuckpy 0.2.2
File Interpreter ABI Platform
brainfuckpy-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / brainfuckpy-0.2.2.tar.gz

Download URL brainfuckpy-0.2.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7d4df7533e34583d687b2db729de7d040c33acb6c332c46e44ee3955098633e1
BLAKE2b-256 checksum
How to use checksums
2787cfda7749785f7841ed230b6a06770d266969642823f57cabd8d0ffa6ab81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release files / brainfuckpy-0.2.2-py3-none-any.whl

Download URL brainfuckpy-0.2.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cee4a05cbbf72df6bd9f0db28f200ceda9ed2e447c33ddaa9646c6a4335b042d
BLAKE2b-256 checksum
How to use checksums
d0d6500141758d4f195138cc3ee999a92e5df9abd0bba46c04b055bf63d88358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page