Is it possible for TextMate to run Python scripts in IDLE instead of internally or via Terminal?
Rather than just use the Python build that comes with IDLE installation I want the shell window to actually launch so I can type in the interactive session.
I’ve had a play on OSX, and I think I’ve got it working.
Open TextMate’s Bundle Editor (
Bundles->Bundle Editor->Show Bundle Editor)On the left hand side: Expand
Python, then duplicate your “Run Script” command (bottom corner, second-left button [++]), and name it “Run Script in IDLE”Choose a keyboard shortcut, and put it in the box next to Activation: Key Equivalent
Replace the following line:
with
This supplies your filepath as an argument to idle, as if you ran
/usr/bin/idle2.7 -r /path/to/script.pydirectly. (Or whatever python version you’re using – /usr/bin/idle3.1 etc)You could also use the
-eflag instead of the-rflag, to edit your script in IDLE instead of running it.