Ulli Horlacher :
> Marko Rauhamaa wrote:
>
>> I'm thinking the only portable way is to run a watchdog process with
>> subprocess or multiprocessing.
>
> How can a subprocess interrupt a function in another process?
>
> For example: waiting for
On 11/12/2015 2:37 AM, Chris Angelico wrote:
On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer wrote:
My understanding of async is that it creates an event loop. In which case
the loop has no chance to run within a block of code that computes anything,
is that correct?
On Thu, Nov 12, 2015 at 9:15 PM, Terry Reedy wrote:
> On 11/12/2015 2:37 AM, Chris Angelico wrote:
>>
>> On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer
>> wrote:
>>>
>>> My understanding of async is that it creates an event loop. In which case
>>> the
On 11/12/2015 6:38 AM, Chris Angelico wrote:
On Thu, Nov 12, 2015 at 9:15 PM, Terry Reedy wrote:
On 11/12/2015 2:37 AM, Chris Angelico wrote:
On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer
wrote:
My understanding of async is that it creates an
Ulli Horlacher :
> What is the best practise for a cross platform timeout handler?
Here's the simplest answer:
https://docs.python.org/3/library/threading.html#threading.Timer
(Also available in Python 2.)
Marko
--
Marko Rauhamaa wrote:
> Ulli Horlacher :
>
> > What is the best practise for a cross platform timeout handler?
>
> Here's the simplest answer:
>
>https://docs.python.org/3/library/threading.html#threading.Timer
>
> (Also available in Python
Ulli Horlacher :
> Hmmm... not so simple for me. My test code:
>
> from time import *
> import threading
> import sys
>
> def hello():
> raise ValueError("hello!!!")
>
> t = threading.Timer(3.0,hello)
> t.start()
> try:
> print "start"
> sleep(5)
> print
I am rewriting a Perl program into Python (2.7).
It must run on Linux and Windows.
With Linux I have no problems, but Windows... :-(
The current show stopper is signal.SIGALRM which is not available on
Windows:
File "fexit.py", line 674, in formdata_post
On 11/11/2015 11:16 AM, Ulli Horlacher wrote:
I am rewriting a Perl program into Python (2.7).
I recommend using 3.4+ if you possibly can.
It must run on Linux and Windows.
With Linux I have no problems, but Windows... :-(
The current show stopper is signal.SIGALRM which is not available on
Terry Reedy :
> The cross-platform 3.4 asyncio module has some functions with
> timeouts.
Even that doesn't forcefully interrupt an obnoxious blocking function
call like
time.sleep(1)
The original question claimed signal.alarm() would do the trick in
Linux. However,
On 11Nov2015 16:16, Ulli Horlacher wrote:
I am rewriting a Perl program into Python (2.7).
It must run on Linux and Windows.
With Linux I have no problems, but Windows... :-(
The current show stopper is signal.SIGALRM which is not available on
Windows:
File
Marko Rauhamaa wrote:
> I'm thinking the only portable way is to run a watchdog process with
> subprocess or multiprocessing.
How can a subprocess interrupt a function in another process?
For example: waiting for user input with a timeout.
raw_input("Hit ENTER to continue or
On Thu, Nov 12, 2015 at 5:43 PM, Christian Gollwitzer wrote:
> My understanding of async is that it creates an event loop. In which case
> the loop has no chance to run within a block of code that computes anything,
> is that correct?
This is correct. At its simplest,
Am 12.11.15 um 07:14 schrieb Marko Rauhamaa:
Terry Reedy :
The cross-platform 3.4 asyncio module has some functions with
timeouts.
Even that doesn't forcefully interrupt an obnoxious blocking function
call like
time.sleep(1)
A blocking call - granted. But what
Terry Reedy wrote:
> On 11/11/2015 11:16 AM, Ulli Horlacher wrote:
> > I am rewriting a Perl program into Python (2.7).
>
> I recommend using 3.4+ if you possibly can.
It is not possible.
The main target platform offers only python 2.7
--
Ullrich Horlacher
Marko Rauhamaa wrote:
> Correct. The timer callback function (hello) would be called in a
> separate thread. An exception raised in one thread cannot be caught in
> the main thread. In general, there is no way for a thread to interrupt a
> sibling thread that is in a blocking
16 matches
Mail list logo