pygtk code factory