BruceBlog

Saturday, December 08, 2007

Emacs and Python

I've been using Emacs with Python on Windows. I found that when I run Python programs from within emacs, and the Python program used a windowing package, then the program would not exit properly and allow it to be run again.

If I go into the task manager and kill the python process, then I could run the program again. I found the solution is to add a call to os.exit() at the end of the program, so it kills the Python process on the way out.

I just started using Emacs version 22.1, and I am a complete neophyte at Python. I've found that Python mode in Emacs is pretty potent. It runs the code in the active buffer just by pressing ^C twice. I also found I could only run the Python code once, until discovering the solution I mention above.

0 Comments:

Post a Comment

<< Home