So yeah, as I check out Emacs, I also checkout things in Textmate that I might not know about, and I’m learning that Textmate can do *lots* more cool stuff than I thought it could. One of those is (yes!) Textmate does have Python debugging built in (both PyCheckMate as well as the standard Python debugger are ready to go out of the box). And with a little tweaking, I can send a Python script I’m working on to the Terminal in interactive mode (Shift+Apple+R). Typically this command just runs the script in Terminal, but this little tweak leaves you in interactive mode.
Open the Textmate bundle editor. Go down to Python -> Run Script (Terminal) and replace this ( $(esc “${TPY}) ):

With this ( python -i ):

Now, when you run this, your script will run, and you’ll be left with a Python prompt for playing around and further debugging.
Leave a comment