osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: Re: Re: Re: stuck on time


On 08/12/2019 14:26, Karsten Hilbert wrote:
>> Like this?
>>   >>>print_time()
>> Traceback (most recent call last)
>> File "stdin>", line 1, in <module>
>> File "stdin>", line 2, in print_time
>> File "stdin>", line 2, in print_time
>> File "stdin>", line 2, in print_time
>> [Previous line  repeated 996 more times]
>> RecursionError: maximum recursion depth excedded.
> 
> Sort of, yes, but since you meanwhile redeclared the function:
> 
> def print_time():
>     print_time()
> 
> to be recursive and then you ran that recursive function
> it recursed until it ran out of resources.
> 
> However,
> 
>> Running the code in a shell , it is displaying the time and now also the  date .
> 
> That would prove that the code itself is not
> the reason why it hangs where you think it
> hangs.
> 
> I suggest sprinkling print statements about the initial code
> and see what it prints to the console to find out where
> (and whether) it actually hangs.
> 
> Karsten
> 

Ok, when I do:
 >>>def print_time():
        print_time()

It hangs.

the code I linked to apparently works for the author and also for some 
others, but not for me. Admittedly they are using the Minecraftia.ttf 
font which gives me the IOError which posted about above this one.
I am presently using the NotoSerif-Regular.ttf font, and I only think 
that that is why nothing else happens.

Thanks