Skip to main content

Random curses from Captain Haddock.

Project description

Aren’t you bored of reading and writing the same error messages over and over again like “Wrong argument!”, “End date must be after start date!” , “Division by zero!” etc. . With the haddock package you will be able to spice them up a bit:

  • “Wrong argument, dipsomaniac!”
  • “End date must be after start date, whipper-snapper!”
  • “Division by zero, interplanetary goat!”

To do this, the method curse() of this package returns random curses from Captain Haddock. At the moment it supports curses in english (default), german and french.

The sources for the curses are - en: - de: die-1w100-fluche-des-kapitan-haddock/ - fr:

Pull requests for other languages are welcome.


pip install haddock-curses


import haddock
>>> print(haddock.curse())

You can use the title() method from Python standard library to capitalize your swears.

>>> print(haddock.curse().title())
>>> print(haddock.curse(lang="de").title())
Sie Logarithmus!
>>> print(haddock.curse(lang="fr").title())
Bande D'Ectoplasmes De Tonnerre De Brest

You can decorate existing exception message with curses.

>>> try: 0/0
... except Exception as e: print(str(e) + ", " + haddock.curse() + "!")
division by zero, confounded rattletrap!!

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 haddock-curses, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size haddock-curses-0.1.5.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page