The other day, I wrote a little database just to fiddle around, but when I try to run it it says that it has an unexpected indent. From what I can tell, it doesn't. Here's the code. I'm using SPE.
database = [] datafile = open('/home/~/the-db/data') for line in datafile: database.append(line) while tf2 != True: command = raw_input("Enter a command. >> ") while tf != True: if "add" in command: adder = raw_input("What to add? >> ") data_base.append(adder) if "no more" in adder: tf = True if "read" in command: print(database) if "search" in command: searcher = raw_input("Enter term to search >> ") if searcher in database: # Figure this out. if "exit database" in command: print "Bye!" sys.exit()
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor