[Tutor] real time response

2017-05-23 Thread Michael C
hi all: I have a code that takes about 20 seconds to complete, but I also need to response to events (the appearance of red dots on a canvas) so I could place a few lines to check for this condition like this def do_stuff: blah blah check() blah blah blah

Re: [Tutor] Looping through Dictionaries

2017-05-23 Thread Mats Wichmann
On 05/23/2017 11:38 AM, Rafael Knuth wrote: > I wrote a function (shopping list) which calculates the total price of > the purchase (quantity * price) as well as the stock change (stock - > quantity). I know the latter is imperfect (my function does not take > into account if items are out of

Re: [Tutor] Looping through Dictionaries

2017-05-23 Thread Alan Gauld via Tutor
On 23/05/17 18:38, Rafael Knuth wrote: > Now, I want to print the item next to the stock update, and I am > receiving an error message. I couldn't figure out how to fix that: So show us the error message, all of it. I can't begin to guess what it might be. UI also don't understand what "print

[Tutor] Looping through Dictionaries

2017-05-23 Thread Rafael Knuth
I wrote a function (shopping list) which calculates the total price of the purchase (quantity * price) as well as the stock change (stock - quantity). I know the latter is imperfect (my function does not take into account if items are out of stock for example, but that's my next challenge. The

Re: [Tutor] recursion

2017-05-23 Thread Peter Otten
Alan Gauld via Tutor wrote: > On 23/05/17 06:18, Peter Otten wrote: >> Michael C wrote: >> >>> oh ya, my function does in fact take no input and doesn't change >>> anything, and all i wanted to was to call itself a 2nd time, yes, so I >>> solved it a few hours back ,and it's good enough for me

Re: [Tutor] recursion

2017-05-23 Thread Alan Gauld via Tutor
On 23/05/17 06:18, Peter Otten wrote: > Michael C wrote: > >> oh ya, my function does in fact take no input and doesn't change anything, >> and all i wanted to was to call itself a 2nd time, yes, so I solved it a >> few hours back ,and it's good enough for me for now :) > > Would you mind

Re: [Tutor] recursion

2017-05-23 Thread Michael C
no i don't have a way, it just hasn't happened yet LOL On Mon, May 22, 2017 at 10:18 PM, Peter Otten <__pete...@web.de> wrote: > Michael C wrote: > > > oh ya, my function does in fact take no input and doesn't change > anything, > > and all i wanted to was to call itself a 2nd time, yes, so I