Hi: I have this code:
try: cursor.execute('select salesperson, office, cell, fax, home, email, assistant from general where salesperson="%s";' % (catch)) stuff = cursor.fetchone() test = raw_input('You have selected salesperson %s. Is that correct? (hit \'enter\' for affirmative, enter anything else for negative): ' % (catch)) if len(test) == 0: salesperson, office, cell, fax, home, email, assistant = new[i][0], new[i][1], new[i][2], new[i][3], new[i][4], new[i][5], new[i][6] print 'one' except: print 'two' salesperson = raw_input('Please enter the sales person\'s name: ') office = raw_input('Please enter the sales person\'s office number: ') cell = raw_input('Please enter the sales person\'s cell number: ') fax = raw_input('Please enter the sales person\'s fax number: ') home = raw_input('Please enter the sales person\'s home number: ') email = raw_input('Please enter the sales person\'s email address: ') assistant = raw_input('Please enter the name of the sales person\'s assistant: ') Now, both "one" and "two" get printed! So it's running the try AND the except!! Why??? TIA, Victor
-- http://mail.python.org/mailman/listinfo/python-list