On Fri, Sep 8, 2017 at 10:03 AM, Thomas Jollans wrote:
> On 2017-09-08 16:49, Steve D'Aprano wrote:
>
>> Sorry for the long delay in replying to this, but if I set its daemon
>> attribute,
>> won't that mean it will live on after the interpreter shuts down?
>>
>> Also, what happens if it tries to
On 2017-09-08 16:49, Steve D'Aprano wrote:
> On Sun, 3 Sep 2017 03:03 am, MRAB wrote:
>
>> On 2017-09-02 11:59, Steve D'Aprano wrote:
>>> On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote:
>>>
I want to delay a computation and then print it, in the REPL (interactive
interpreter). I have
On 09/08/2017 07:49 AM, Steve D'Aprano wrote:
On Sun, 3 Sep 2017 03:03 am, MRAB wrote:
Timer is a subclass of Thread, so you can set its .daemon attribute.
Sorry for the long delay in replying to this, but if I set its daemon attribute,
won't that mean it will live on after the interpreter s
On Sun, 3 Sep 2017 03:03 am, MRAB wrote:
> On 2017-09-02 11:59, Steve D'Aprano wrote:
>> On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote:
>>
>>> I want to delay a computation and then print it, in the REPL (interactive
>>> interpreter). I have something like this:
>> [...]
>>> The other problem
On 9/2/2017 6:53 AM, Steve D'Aprano wrote:
I want to delay a computation and then print it, in the REPL (interactive
interpreter). I have something like this:
import time
from threading import Timer
def do_work():
x = 2 + 2
print("It is", time.asctime(), "and 2+2 is", x)
def schedul
On Sat, Sep 2, 2017 at 5:53 AM, Steve D'Aprano
wrote:
>
> The problem is that after the message is printed, the REPL's prompt is
> disrupted. This is especially annoying when I'm in the middle of typing a
> line.
> This is just a cosmetic flaw, but it would be nice if I could tell Python to
> red
On 2017-09-02 11:59, Steve D'Aprano wrote:
On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote:
I want to delay a computation and then print it, in the REPL (interactive
interpreter). I have something like this:
[...]
The other problem is that if I exit the REPL while a Timer is still active, i
On Sat, Sep 2, 2017 at 8:53 PM, Steve D'Aprano
wrote:
> The problem is that after the message is printed, the REPL's prompt is
> disrupted. This is especially annoying when I'm in the middle of typing a
> line.
> This is just a cosmetic flaw, but it would be nice if I could tell Python to
> redra
On Sat, 2 Sep 2017 08:53 pm, Steve D'Aprano wrote:
> I want to delay a computation and then print it, in the REPL (interactive
> interpreter). I have something like this:
[...]
> The other problem is that if I exit the REPL while a Timer is still active, it
> freezes until the time has run before
I want to delay a computation and then print it, in the REPL (interactive
interpreter). I have something like this:
import time
from threading import Timer
def do_work():
x = 2 + 2
print("It is", time.asctime(), "and 2+2 is", x)
def schedule_work():
Timer(60, do_work, ()).start() #
10 matches
Mail list logo