[wxPython] Please Help ...

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

[wxPython] Please Help ...

David Oppenheimer
Dear Group,

I am working on a drag and drop GUI maker and need to know if the
equivalent of the following code can be written for wxPython.  If so, we
may be able to create a program that gives the user a choice of Tkinter
or wxPython code.  I am not an expert in wxPython and my main cohort is
a Tkinter wizard.  It was only at my urging that he considered making
wxPython an output choice.  BTW, this program or module V - GUIDO
(Visual Graphical User Interface Design Optimizer) will be made freely
available to the Python community.  This program may lead the way to
greater popularity for Python and wxPython.  That is, if we can get some
assistance from you wxPython wizards out there.

So...if you can, PLEASE help rewrite the following code for wxPython.


===================Python Tkinter Code 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()

================End====================

Thanks For Your Participation

David O.


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