On Tue, 8 Jul 2014 12:52:40 +0300
"Ville M. Vainio" <vivai...@gmail.com> wrote:

> Yeah, just press ctrl-c in the terminal you used to launch Leo

I was thinking more of locating the pid and sending a signal with
'kill', in the case where you didn't have the launching terminal
available :-)

Cheers -Terry

>  On Jul 8, 2014 5:21 AM, "'Terry Brown' via leo-editor" <
> leo-editor@googlegroups.com> wrote:
> 
> > 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.
> >
> 

-- 
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