> Desired behavior: when I type 'exit' the program should quit.

def search():
    user_input = ''
    while True:
        user_input = raw_input('Search for: ')
        if user_input == 'exit': break
        print 'processing', user_input

Note that putting user input directly into SQL statements leaves your
database open to SQL-injection attacks :-)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to