Advertisement
clockworkpc

Make Me A Sandwich

May 1st, 2011
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.97 KB | None | 0 0
  1. #!/usr/bin/python
  2. #/home/clockworkpcasus/Documents/bin/sandwich.py
  3.  
  4. # Released under a GPLv3 Licence by Clockwork PC 2011
  5. #
  6. # www.clockworkpc.com.au
  7. #
  8. # You are entitled to the following four freedoms:
  9. # Freedom 0: To run this program for any purpose
  10. # Freedom 1: To study how this program works and change it to make it do what you wish
  11. # Freedom 2: To redistribute copies so you can help your neighbour
  12. # Freedom 3: To distribute copies of your modified version to others
  13.  
  14. import os
  15.  
  16. running = True
  17. while running:
  18.     answer = raw_input("""
  19.     What do you want?
  20.    
  21.     """)
  22.     os.system("clear")
  23.     if "sudo" in answer:
  24.         if "make" in answer:
  25.             if "sandwich" in answer:
  26.                 running = False
  27.             else:
  28.                 print "Sorry, this is a sandwich-only joke."
  29.     elif "Sudo" in answer:
  30.         if "make" in answer:
  31.             running = False
  32.     elif "make" in answer:
  33.         print "Make it yourself!"
  34.     elif "Make" in answer:
  35.         print "Make it yourself!"
  36.     else:
  37.         print "Bugger off, mate."
  38. print "OK."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement