On Sun, May 28, 2017 at 11:15 AM, Adrian Calvin <developer.adr...@gmail.com>
wrote:

> Hello,
>
> Is there a way to kill a script without killing leo?
>

​That depends on how you start it. You can kill the following script (run
with Ctrl-B) provided you run Leo from a console:

i = 1
n = 100000 # My machine is pretty fast
try:
    while True:
        i += 1
        if (i % n) == 0:
            print(i / n)
except KeyboardInterrupt:
    print('done')

Without the try/except, the keyboard interrupt (Ctrl-C on Windows) will
kill Leo.

When running pylint, Ctrl-C will halt both Leo and pylint.  Instead, use
the pylint-kill command. This may be a bug in Leo's
BackgroundProcessManager (BPM) class.  Or not.

Anyway, you can use the BPM class to create background tasks, and Leo will
survive if you kill those tasks with the BPM.

All comments and suggestions are welcome.

Edward

-- 
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 https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to