[Tutor] Re: Python question

Lee Harr missive@hotmail.com
Thu Mar 27 23:13:01 2003


I am not too familiar with this, but I think my code
might look more like this:



import Pmw

class EntryClass:
    def __init__(self, Frame2):
        self.EntryWidget = Pmw.EntryField(Frame2,
                        label_text='Enter command:',
                        labelpos='w')
        callback = SimpleCallback(self.callback)
        self.EntryWidget.configure(command=callback)
        self.EntryWidget.pack(pady=25)

    def callback(self):
        value = self.getvalue()
        print value
        if value:
            SendCommand(value)


# not sure where you get Frame2
entry = EntryClass(Frame2)


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail