skip to navigation
skip to content

surrealism 0.8.0

Surreal sentence and error message generator.

Latest Version: 1.0.1

surrealism module for Python

This module allows you to generate surreal sentences and error messages very easily from within your python programs.

This module is a derivative work (used with permission) from

Credit also goes to Kevan Davis on whose work the surrealism generator at is based on.


If you have downloaded the source distribution, to install do the following at the commandline:

$ python install

Or using easy_install:

$ easy_install surrealism

And it will download and install the latest version from the Python Package Index.

Or pip:

$ pip install surrealism

And it will download and install the latest version from the Python Package Index.

Usage Examples

Generate a surreal sentence:

>>> import surrealism
>>> sentence = surrealism.getsentence()
>>> print sentence
>>> If I can get the Pot Noodle to enter Radiohead's Lead Singer, the lego-brick will dilute Julian Assange and I'll be able to spy on Neil Armstrong!

Generate a surreal error message:

>>> import surrealism
>>> print surrealism.getfault()
>>> thing.c:466: fearsome error in 'blow-up doll()' - missing thing-a-ma-jig.

Please feel free to leave bug reports and feature requests on the github homepage at

All comments are welcome!



Added comments to code and fixed some dodgy sentences in the database.


Added a new table which allows more faults rather than just the C++ syntax fault. Also added faulttest() and sentencetest() so you can print out all sentences and faults.


Added the ability to have the entire sentence in uppercase (some sentences require it) and tripled the size of the ‘names’ table.


More database tweaks to fix spacing issues.


Fixed print statement which prevented installation and use on Python 3x.


Added pkg_resources to manage sqlite file installation (particularly a problem when using virtualenv).


Added seperate script (sentence_test)


Fixed bug with adjectives and tidied database.


Added basic docstrings.


Removed unnecessary Class, now making it even easier and simpler to use.


Minor bug fix to the getfault sentences where 2 periods were printing instead of 1.


Urgent bug fix to getfault where returned result was incomplete.

File Type Py Version Uploaded on Size
surrealism-0.8.0-py2.7.egg (md5) Python Egg 2.7 2014-01-09 109KB (md5) Source 2014-01-09 123KB