Thanks that's much nicer.
On Fri, 11 Feb 2005 22:28:55 -0500, Kent Johnson <[EMAIL PROTECTED]> wrote: > If you iterate over the author nodes you can check the user name and password > of each in turn. > > Not tested code! > > def authenticateAuthor(author, password): > authorxml = 'author.xml' > path = os.path.join(xml, authorxml) > if not os.path.exists(path): > return False, False > else: > tree = E.ElementTree(file=path) > for authorNode in tree.getiterator('author'): > user = authorNode.find('user').text > pass = authorNode.find('password').text > > if author == user: > if password == pass: > return True, True > else: > return False, True > > return False, True _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor