This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

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

Installation

Install it using:

$ pip install whitespace

You would now have access to an executable called whitespace. Type

$ whitespace -h

to learn more.

Usage

Let’s say you’ve written a Whitespace program and stored it in the file program.ws. Then, to execute that program, type:

$ whitespace program.ws

You can find example Whitespace programs at tests/fixtures. Be sure to run them to see what they do.

For example, here’s the factorial program and a sample execution:

$ whitespace fact.ws
Enter a number: 40
40! = 20397882081197443358640281739902897356800000000

Development

Get the source code.

$ git clone git@github.com:dwayne/whitespace-python.git

Create a virtual environment and activate it.

$ cd whitespace-python
$ pyvenv venv
$ . venv/bin/activate

Then, upgrade pip and setuptools and install the development dependencies.

(venv) $ pip install -U pip setuptools
(venv) $ pip install -r requirements-dev.txt

You’re now all set to begin development.

Testing

Tests are written using the unittest unit testing framework.

Run all tests.

(venv) $ python -m unittest

Run a specific test module.

(venv) $ python -m unittest tests.test_parser

Run a specific test case.

(venv) $ python -m unittest tests.test_parser.ParserTestCase

Run a specific test method.

(venv) $ python -m unittest tests.test_parser.ParserTestCase.test_it_parses_push

References

Credits

Thanks to Edwin Brady and Chris Morris for designing/developing this programming language (also developers of the Idris programming language). I’ve had lots of fun playing with it and writing interpreters (in Racket, Haskell, Ruby and now Python) for it.

Change Log

1.0.0b2 (2016-09-03)

Added

Changed

  • Explicitly list the packages to be included in the distribution
  • Stop including tests in the distribution
  • Stop using codecs.open since open does the job in Python 3
  • Consistently name test cases with a TestCase suffix

1.0.0b1 (2016-09-02)

Added

  • A fully tested parser with error handling and source location tracking
  • An interpreter
  • A CLI for running the interpreter

Fixed

  • Fix the console’s output buffering by flushing after every write

0.1.0.dev2 (2016-09-01)

Changed

  • Update MANIFEST.in and setup.py to ensure the correct files are included in the distribution

0.1.0.dev1 (2016-08-31)

Added

  • A virtual machine
  • A console abstraction to make it easier to test I/O
  • The stack manipulation, arithmetic, heap access, flow control and I/O instructions

0.0.1.dev1 (2016-08-31)

Birth!

Release History

Release History

1.0.0b2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0b1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0.dev2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0.dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.0.1.dev1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
whitespace-1.0.0b2-py3-none-any.whl (13.7 kB) Copy SHA256 Checksum SHA256 py3 Wheel Sep 3, 2016
whitespace-1.0.0b2.tar.gz (9.3 kB) Copy SHA256 Checksum SHA256 Source Sep 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting