[Tutor] "Ctrl-C (unix)" in python
Jervis Whitley
jervisau at gmail.com
Thu Feb 19 01:41:58 CET 2009
On Thu, Feb 19, 2009 at 9:44 AM, pa yo <payo2000 at gmail.com> wrote:
> I am running my Twitter>>Wiki bots in infinite loops but can't find
> an easy way to turn them off gracefully once I have started them. At
> the moment I have to go into the terminal window where they are
> running and type "Ctrl-C". (I am running Ubuntu 8.10 and python 2.5.2)
>
> I was thinking that I could get the bot script to read a text file at
> the start of the main loop and have a separate script writing the
> "exit" order to the same text file.... but before I get too involved
> with this I wanted to know if there was an built-in function to
> switch scripts on and off.
>
> Any help or assistance much appreciated.
>
> Payo
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
how about kill -9 <python's pid> :)
More information about the Tutor
mailing list