Skip to main content

Surreal sentence and error message generator.

Project description

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 www.ravenblack.net.

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

Installation

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

$ python setup.py 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 https://github.com/Morrolan/surrealism.

All comments are welcome!

Changelog

0.7.0

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.

0.6.0

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

0.5.6

More database tweaks to fix spacing issues.

0.5.5

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

0.5.4

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

0.5.3

Added seperate script (sentence_test)

0.5.2

Fixed bug with adjectives and tidied database.

0.5.1

Added basic docstrings.

0.5.0

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

0.4.1

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

0.4

Urgent bug fix to getfault where returned result was incomplete.

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

surrealism-0.7.0.tar.gz (121.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

surrealism-0.7.0-py3.3.egg (109.8 kB view details)

Uploaded Egg

surrealism-0.7.0-py2.6.egg (110.1 kB view details)

Uploaded Egg

File details

Details for the file surrealism-0.7.0.tar.gz.

File metadata

  • Download URL: surrealism-0.7.0.tar.gz
  • Upload date:
  • Size: 121.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for surrealism-0.7.0.tar.gz
Algorithm Hash digest
SHA256 1b1f86e0eafe52ad4ea7b31ea00c84ae42b94fce485152f116585bb0011434ac
MD5 0564835377245778d85a5359e557eef8
BLAKE2b-256 9ceb7c87895d929f20c914fcc1ca2637192e1fd2083d324398bbc463bf545a76

See more details on using hashes here.

File details

Details for the file surrealism-0.7.0-py3.3.egg.

File metadata

  • Download URL: surrealism-0.7.0-py3.3.egg
  • Upload date:
  • Size: 109.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for surrealism-0.7.0-py3.3.egg
Algorithm Hash digest
SHA256 45a6d5b976ae7cc012a85cc7f89d7bd5e9f192bed56a32d5412575f7f3534d21
MD5 45ecf979a45edce6db39cf587d9599b5
BLAKE2b-256 828dfc56fe510411c4c2a48483b27f2ed1332bff3d4630438f761045bcadc8d1

See more details on using hashes here.

File details

Details for the file surrealism-0.7.0-py2.6.egg.

File metadata

  • Download URL: surrealism-0.7.0-py2.6.egg
  • Upload date:
  • Size: 110.1 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for surrealism-0.7.0-py2.6.egg
Algorithm Hash digest
SHA256 2fa6aedb14d64c5a305515356679a59129d1ee464384db768a8a3fbcf77a90a7
MD5 3b8760b70c95f70dde081ef43b61779a
BLAKE2b-256 d6203c1308fd09cf8fbda2a344410f010c74574a95f79a146445781379f091cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page