Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #97956
| Path | csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Peter Pearson <pkpearson@nowhere.invalid> |
| Newsgroups | comp.lang.python |
| Subject | Re: how to use variable outside function tkinter entry |
| Date | 26 Oct 2015 18:58:53 GMT |
| Lines | 30 |
| Message-ID | <d97bfdFgb5aU1@mid.individual.net> (permalink) |
| References | <562e7038$0$24168$e4fe514c@news.kpn.nl> |
| X-Trace | individual.net fJvQ1Ty/X1COmFEDZ1m4/wUBGaTAzqR0ul+owvrVgvI3fIAnBW |
| Cancel-Lock | sha1:hMjY0aQ1Vsv6/aUM4d9kf4Zgtwc= |
| User-Agent | slrn/pre1.0.0-18 (Linux) |
| Xref | csiph.com comp.lang.python:97956 |
Show key headers only | View raw
On Mon, 26 Oct 2015 19:24:20 +0100, Harrie Hoenjet <h.hoenjet@planet.nl> wrote: > Hi guys, > suppose i have a tkinter Entry widget (Python 3.4 Tkinter 8.5) > mySalary = Entry(root, textvariable='salary', command=calculate') > > I have defined > salary = IntVar() > > and a function: > def calculate(): > wages = salary.get() > .... > return > > > How can i use the variable wages outside the function calculate? > For example: print(wages) or print (w=calculate()) when I add return wages) > does not work. Huh? "print (w=calculate())" ? What language is this, anyway? Try w = calculate() print(w) and if it doesn't work, report the exact output here. -- To email me, substitute nowhere->runbox, invalid->com.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to use variable outside function tkinter entry "Harrie Hoenjet" <h.hoenjet@planet.nl> - 2015-10-26 19:24 +0100 Re: how to use variable outside function tkinter entry Peter Pearson <pkpearson@nowhere.invalid> - 2015-10-26 18:58 +0000 Re: how to use variable outside function tkinter entry Randy Day <randy.day@sasktel.netx> - 2015-10-26 14:46 -0600
csiph-web