def make_toplevel(master, title=None, class_=None):
 if class_:
  widget = Toplevel(master, class_=class_)
 else:
  widget = Toplevel(master)
 if title:
  widget.title(title)
  widget.iconname(title)
 return widget

def make_toplevel ( master , title = None , class_ = None ) : if class_ : widget = Toplevel ( master , class_ = class_ ) else : widget = Toplevel ( master ) if title : widget . title ( title ) widget . iconname ( title ) return widget
create a toplevel widget .