python 2.7 - Can you change the variable an optionmenu writes to in Tkinter? -


say have following optionmenu:

   self.cart = stringvar(self.frame1)        self.cart.set("")    self.e1 = optionmenu(self.frame1, self.cart, *watercarts)       self.e1.grid(row=1, column=1, stick=e+w) 

as is, save selected option self.cart. there way change that? tried:

    self.e1.config(variable=self.othervar) 

it returns, tclerror: unknown option "-variable".


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -