#NEWLINE# def find_subclass( cls , subname ) : #NEWLINE# #INDENT# 'Find a subclass by name.\n    ' #NEWLINE# l = [ cls ] #NEWLINE# while l : #NEWLINE# #INDENT# l2 = [ ] #NEWLINE# for c in l : #NEWLINE# #INDENT# if ( c . __name__ == subname ) : #NEWLINE# #INDENT# return c #NEWLINE# #UNINDENT# l2 += c . __subclasses__ ( ) #NEWLINE# #UNINDENT# l = l2 #NEWLINE# #UNINDENT# return None