@icktoofay The program is running perfectly fine, I just want to be able to stop or restart the program from another Python script. I'll edit the question to avoid this confusion.
–
RainbowSep 17 '11 at 7:52

3 Answers
3

Use the poison pill technique. Upon receipt of a pill (a special message) your program must handle it and die.. The way you're doing it its ok, but for something more elegant, you should implement a kind of communication between your "killing script" and your main program. For a start, have a look in the standard library for Interprocess Communication and Networking.