On Mon, 7 Jul 2014 18:55:11 -0700 (PDT)
SegundoBob <segundo...@gmail.com> wrote:

> Does anyone know how to cancel a Leo-Editor script that is started by 
> Ctrl-B?

I'm not sure if it can be done from Leo, I think the Ctrl-B scripts are
run in the same process as Leo itself.  Would a solution involving
sending the signal from the unix/linux command line be relevant to
you?  Although that may kill Leo completely, so I'm not sure it would
help.

Cheers -Terry

> I know how to use Ctrl-C to cancel a python script that is run from
> the command line:
> 
> import sys
> import time
> 
> idx = 0
> try:
>     while True:
>         print '{0}\r'.format(idx),
>         sys.stdout.flush()
>         idx += 1
>         time.sleep(1)
> except KeyboardInterrupt:
>     print '\nKeyboardInterrupt'
> print('Bye')
> 
> 
> But this does not work for a Leo-Editor script started by Ctrl-B.
> 
> Since Leo-Editor is a PyQt4 application, I tried some of the
> solutions suggested here:
> 
> http://stackoverflow.com/questions/4938723/what-is-the-correct-way-to-make-my-pyqt-application-quit-when-killed-from-the-co
> 
> But they don't work.
> 
> 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to