[Bf-committers] signal.h
Ton Roosendaal
bf-committers@blender.org
Fri, 18 Jul 2003 11:53:48 +0200
Hi,
> The python interpreter also catches CTRL+C's, that's the way to get out
> of long or infinite loops there, too. It's the signal
> "KeyboardInterrupt", reported just as any other error code. That's
> much
> probably what the comment you mentioned meant. They wanted to let the
> python interpreter catch CTRL+C to be able to stop scripts.
Is this something you can change internally? Or by implementing an
interrupt system like we have for ESC during render?
From a unix perspective, having a program running in your console, I
would prefer to be able to CTRL+C it. I can also live with a
compromise, where I set this CTRL+C signal only when Blender starts in
background mode (blender -b).
-Ton-
>
> A simple test is this 'script':
>
> for i in range(500000):
> print i
>
> Running it in a Blender text win, I have to go to the console to stop
> the interpreter with CTRL+C, it doesn't work at the text win (where
> CTRL+C is naturally ignored) itself. This is with a 3 or 4 days old
> cvs
> binary.
>
> So maybe there's no problem: to stop the python interpreter, press
> CTRL+C at the console window, to stop Blender do it in Blender. But I
> couldn't test your change yet, how it affects Blender when a script
> like
> the two-liner above is running.
>
> --
> Willian, wgermano@ig.com.br
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------
--
Ton Roosendaal Blender Foundation ton@blender.org
http://www.blender.org