Skip to main content

A Whitespace interpreter.

Project description

An interpreter written in Python for the imperative, stack-based language called Whitespace.


To install, simply use pip (or pipenv):

$ pip install whitespace


Let be any Whitespace program. To execute it, type:

$ whitespace

You can find example Whitespace programs at tests/fixtures.

For example, here’s the factorial program:

$ whitespace
Enter a number: 40
40! = 815915283247897734345611269596115894272000000000


Recommended tools:

Clone the repository and install the dependencies:

$ git clone
$ cd whitespace-python
$ pipenv shell
$ pipenv install --dev

You’re now all set to begin development.


Tests are written using the built-in unit testing framework, unittest.

Run all tests.

$ python -m unittest

Run a specific test module.

$ python -m unittest tests.test_parser

Run a specific test case.

$ python -m unittest tests.test_parser.ParserTestCase.test_it_parses_push



Thanks to Edwin Brady and Chris Morris for designing/developing this programming language; they are also developers of the Idris programming language.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for whitespace, version 1.0.0b8
Filename, size File type Python version Upload date Hashes
Filename, size whitespace-1.0.0b8-py3-none-any.whl (10.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size whitespace-1.0.0b8.tar.gz (9.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page