Re: [Tutor] tkinter code executes before function returned

2018-04-16 Thread Chris Roy-Smith
On 15/04/18 18:10, Alan Gauld via Tutor wrote: On 15/04/18 03:57, Chris Roy-Smith wrote: I am trying to get tkinter to return a number from a window, which then sets how many times to print a sign. I don;t jhave time to look at this in detail just now, maybe later. But first impressions is

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Mats Wichmann
On 04/15/2018 03:13 PM, Chris Roy-Smith wrote: > On 15/04/18 23:36, Alan Gauld via Tutor wrote: >> On 15/04/18 14:24, Alan Gauld via Tutor wrote: >> >>> OK, I've had a closet look now and can confirm the >> A closer look! Not a closet look. Ooops! :-/ >> >> > Thank you Alan, I have even more to

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Chris Roy-Smith
On 15/04/18 23:36, Alan Gauld via Tutor wrote: On 15/04/18 14:24, Alan Gauld via Tutor wrote: OK, I've had a closet look now and can confirm the A closer look! Not a closet look. Ooops! :-/ Thank you Alan, I have even more to learn than I thought. I have been bashing away at several OOP

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Alan Gauld via Tutor
On 15/04/18 14:24, Alan Gauld via Tutor wrote: > OK, I've had a closet look now and can confirm the A closer look! Not a closet look. Ooops! :-/ -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Alan Gauld via Tutor
On 15/04/18 03:57, Chris Roy-Smith wrote: > The code does not wait till the function returns a value, OK, I've had a closet look now and can confirm the problem lies in your code structure. Its not event based. You need to understand event-driven programming better. In event driven code you

Re: [Tutor] tkinter code executes before function returned

2018-04-15 Thread Alan Gauld via Tutor
On 15/04/18 03:57, Chris Roy-Smith wrote: > I am trying to get tkinter to return a number from a window, which then > sets how many times to print a sign. I don;t jhave time to look at this in detail just now, maybe later. But first impressions is that you have a very unorthodox style of

[Tutor] tkinter code executes before function returned

2018-04-15 Thread Chris Roy-Smith
Hi, System: Python 3.6, Ubuntu Linux 17.10 I am trying to get tkinter to return a number from a window, which then sets how many times to print a sign. The code does not wait till the function returns a value, resulting in the signcount variable in having a None value, giving an output like