A symbol representing the blue rose.

Tarot

The tarot (first known as trionfi and later as tarocchi or tarock) is a pack of playing cards, used from at least the mid-15th century in various parts of Europe to play games such as Italian tarocchini, French tarot and Austrian Königrufen, many of which are still played today. In the late 18th century, some tarot decks began to be used for divination via tarot card reading and cartomancy leading to custom decks developed for such occult purposes.

Rider–Waite tarot deck

The Rider–Waite tarot deck is a popular deck for tarot card reading. Illustrated by Pamela Colman Smith, based on the instructions of academic and mystic A. E. Waite, the cards were originally published by the Rider Company in 1909. The deck has been published in numerous editions and inspired a wide array of variants and imitations.

You can find images of all the cards on the deck's Wikipedia page.

tarot.py

Below is a quick and dirty implementation of the Rider-Waite tarot deck in Python 3. It has a -d flag that allows you to select a card drawing method(only one(default), past-present-future, and until the first Major Arcana card is drawn), as well as the -r flag, which causes some cards to be reversed...

# pyTAROT
# written by Enargeia(detondev.com)
# all that code below this is CC0, btw!

import argparse
from random import choice, randint

parser = argparse.ArgumentParser()
parser.add_argument('-d', '--draw', choices=['one','ppf','uma'], help='select your drawing method')
parser.add_argument('-r', '--reversal', action='store_true', help='cards can sometimes be reversed')
args = parser.parse_args()

majorArcana = ['The Fool','The Magician','The High Priestess','The Empress','The Emperor','The Hierophant','The Lovers','The Chariot','Strength','The Hermit','Wheel of Fortune','Justice','The Hanged Man','Death','Temperance','The Devil','The Tower','The Star','The Moon','The Sun','Judgement','The World']
minorArcanaStarts = ['Ace','Two','Three','Four','Five','Six','Seven','Eight','Nine','Ten','Page','Knight','Queen','King']
minorArcanaSuits = ['Wands','Pentacles','Cups','Swords']
deck = []


# DECK ASSEMBLY

for a in majorArcana:
    rev = randint(-1, 2)
    if rev == 2 and args.reversal:
        deck.append(a + ' (reversed)')
    else:
        deck.append(a)
for b in minorArcanaSuits:
    for c in minorArcanaStarts:
        rev = randint(-1, 2)
        if rev == 2 and args.reversal:
            deck.append(c + ' of ' + b + ' (reversed)')
        else:
            deck.append(c + ' of ' + b)


# DISPLAY

card = choice(deck)

if args.draw == 'ppf':
    d = 0
    while d < 3:
        deck.remove(card)
        card = choice(deck)
        print(card)
        d += 1
elif args.draw == 'uma':
    e = False
    while e != True:
        for f in majorArcana:
            if card == f:
                e = True
        print(card)
        if e != True:
            deck.remove(card)
            card = choice(deck)
else:
    print(card)

Art

Ludens

!The Fool's Errand by Cliff Johnson (Macintosh/DOS/Amiga)