Skip to main content

Brainfuck interpreter

Project description


Yet another Brainfuck interpreter written in Python.

For sample programs navigate to esolangs wiki or here.


Run directly as a shell script:

$ cat > file.b
$ chmod +x file.b
$ ./file.b

Run as a Python script:

$ /path/to/file.b

Run as a Python module:

$ python -m brainf /path/to/file.b

Run as a Python Executable (PEX):

$ python brainf-linux.pex /path/to/file.b

See technical documentation for more details.


Source code:

$ git clone


In a new virtual environment:

$ pip install .

To uninstall:

$ pip uninstall brainf


Binary Distribution

To build a binary distribution with Docker and PEX follow the steps below.

  1. Create a new Docker image.
$ docker build -t brainf:linux -f Dockerfile.linux .
  1. Run interim container to extract .pex file from the image.
$ docker run --rm brainf:linux cat /root/brainf-1.0.0-linux.pex > brainf-linux.pex


To build Sphinx documentation:

$ pip install -r requirements-dev.txt
$ cd docs/
$ make clean html


The recommended way to publish a project on PyPI is with twine since it uses SSL by default.

  1. Make sure twine is installed:
$ pip install twine
  1. Create source and binary distributions:
$ python sdist bdist_wheel
  1. Upload to Python Package Index.

    Test PyPI:

    $ twine upload --repository-url dist/*


    $ twine upload dist/*


This project is licensed under the MIT License.

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

brainf-0.0.1.tar.gz (7.4 kB view hashes)

Uploaded source

Built Distribution

brainf-0.0.1-py3-none-any.whl (10.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page