using optionmenu in tkinter (python 3.3) -


I am trying to create a simple interface with the tanker (which I am now learning). Basically I have found that I can use the Options menu to get a drop down menu with some options (they are called OP1, OP2 and OP3). What I want is that how long this option is selected and can save it in the list which looks like this:

  [['OP1', 12.5], ['OP2' 15.35]]  

so that I can save it later on a CSV file, I do not believe in seconds for a few seconds because I can change it later, If this was the regular code interface I know that I can do something like this:

  start = time.time () a = input ("Enter to switch" Left ... ") end = time.time () b = (end-start)  

Or something similar, please tell me if you have any ideas and keep in mind I At Python 3.3.

Update:

I did this (definitely with a lot of Internet help):

ex> from Taginer imports * Class MyOptionMenu ( OptionMenu): def __init __ (self, master, status, * option): self.var = StringVar (Master) self.var.set (status) OptionMenu .__ init __ (self, master, self., * Option) self .ititIi (self): self.master.title ("timer") self.pack (fill = both, extension = 1) def main (): root = tec () = ('= 1', ' = ',' = ',' Ar ',' es'] mymenu1 = MyOptionMenu (root, 'select position', skills [0], skills [1], skills [2]) mymenu1.grid (column) = 2, line = 2) mymenu1.place (x = 130, y = 50) root.mainloop () if __name__ == '__main__': main ()

Now let me count it There is a need to do so how much time has been chosen for each situation and an additional situation to save information in a CSV. Besides, I really appreciate a different way to add skills to the menu, I feel strange. / P>

Thanks again!

Can be assigned to a variable and then enter a callback for any change in events. There is a good writing exception.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -