[wxPython] wxPython Default Widgets - Please Help

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[wxPython] wxPython Default Widgets - Please Help

David Oppenheimer
Dear Group,

Still trying to get some help here.  What I want to do is to have code
which will provide a listing of the defaults for the following wxPython
widgets: Button, Canvas, Checkbutton, Entry, Frame, Label, Listbox,
#Menu, Menubutton, Message, Radiobutton, Scale, & Scrollbar.

I need these to be able to have wxPython as an output choice in a drag
and drop GUI maker I am collaborating on.  So please help, or the only
output choice for this software will be Tkinter.  I am not going to
beg.  If I get no responses to this posting then Tkinter it is.  That
would be sad cause I had really hoped for a multi widget programming
aide.

The Tkinter code (that I require the equivalent of in wxPython) is as
follows:


from Tkinter import *

def write_defaults(Widget):
        widget = Widget()
        widget.place(x=0, y=0)
        filename = "%s.txt" % Widget.__name__
        file = open(filename, "w")
        for key in widget.keys():
                if widget[key] == "":
                        widget[key] = None
                        print widget[key]
                file.write("%s = %s\n" % (key, widget[key]) )
        file.close()



if __name__ == "__main__":
        root = Tk()
        widgets = [ Button,
                        Canvas,
                        Checkbutton,
                        Entry,
                        Frame,
                        Label,
                        Listbox,
                        #Menu,
                        Menubutton,
                        Message,
                        Radiobutton,
                        Scale,
                        Scrollbar]
        for widget in widgets:
                write_defaults(widget)
        root.mainloop()



Thanks,

David Oppenheimer


_______________________________________________
wxPython-users maillist  -  [hidden email]
http://starship.python.net/mailman/listinfo/wxpython-users