An open API service indexing awesome lists of open source software.

https://github.com/jochasinga/py-brainfuck

Simple Brainfuck interpreter written in Python
https://github.com/jochasinga/py-brainfuck

brainfuck interpreter python toy-compiler

Last synced: 10 months ago
JSON representation

Simple Brainfuck interpreter written in Python

Awesome Lists containing this project

README

          

# brainfuck
A simple [Brainfuck](1) interpreter written in Python.

## setup
No deps. Just python >= 2.7.9 is required.

## usage

Run as a command line tool

```shell

$ echo "++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++." | python brainfuck.py

```

Read a Brainfuck file

```shell

$ python brainfuck.py helloworld.bf

```

Use in another module

```python

from brainfuck import interpret

interpret("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.")

```

[1]: http://www.muppetlabs.com/~breadbox/bf/