[IPython-user] Threading
Ville M. Vainio
vivainio@gmail....
Thu Aug 21 03:13:16 CDT 2008
On Thu, Aug 21, 2008 at 7:26 AM, Gael Varoquaux
<gael.varoquaux@normalesup.org> wrote:
>> However, I think the need to use threads in the first place is mostly
>> superstition. We could get by without threads easily:
> But you don't use a wx frontend. You use a terminal to host your ipython.
> This is not what we are talking about.
Ah, I was indeed talking about normal terminal ipython (since there
was talk about threads - GUI frontends only need them to avoid
blocking while code is being run).
> This is a hard problem, and I advise anybody who is going to try and
> tackle it to think twice before coming up with a "solution".
The "solution" was for terminal ipython. For current wxIPython, the
solution is to remove the runner thread. This will remove support for
ctrl + C, but I think that could be added "somehow" - I don't know
about wx enough to tell it exactly, but I suppose it disables ctrl+C
somehow and you just have to re-enable it.
Perhaps an interim solution would be an ability to explicitly
enter/exit the interruptible mode. A pylab interface could just add a
hook that enters non-interruptible mode when you enter the "plot"
command.
It's a bit hacky, but it would get the job done without breaking existing code.
--
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user
mailing list