import subprocess from bureau import Bureau, add_command class Humor(Bureau): """ This bureau entertains the modern worker and provides colorful bons mots for managers who need to warm up an audience. """ name = "Department of Humor" prefix = "HA" version = 0 def __init__(self): Bureau.__init__(self) @add_command("joke", "Fortune Cookie") def print_fortune(self): """ Prints a clever quip. """ print(str.decode(subprocess.check_output("fortune"))) if __name__ == "__main__": ha = Humor() ha.run()