def display_form(window, object):
for elementname in dir(object):
element = getattr(object, elementname)
if type(element) == FloatType:
window.add_float_field(elementname, element)
elif type(element) == IntType:
window.add_int_field(elementname, element) |