2007-05-19

Bloody PythonLauncher screwed Terminal.app!

I was swearing my head off, scaring my girlfriend while I was at since I usually don't go off the handle that badly, when PythonLauncher screwed Terminal.app. For the non-OS X users out there, PythonLauncher is an application that comes with Python on OS X that lets you double-click a Python script to launch it. Terminal.app is the terminal application in OS X. Since I do most of my coding using a terminal not having it work was VERY frustrating.

For some unknown reason Terminal.app was running the command that PythonLauncher used to execute Python scripts. That was especially painful for me as I use keychain and thus need to enter my password for my SSH 2 key when my shell launches if I do not have an ssh-agent running yet. Having some command get pasted in instead and lock up the shell did not make me happy.

If anyone ever has troubles like this (closest I found was someone sending an email about how pythonlauncher possessed terminal), the solution is to use the Property List Editor that comes with the Apple Developer Tools (/Developer/Applications/Utilities/Property List Editor) to edit the plist for Terminal (~/Library/Preferences/com.apple.Terminal.plist). If you look you will find an executeString key with a value of what PythonLauncher uses. Delete that key, save the plist, and Terminal.app should then be fixed. Probably best to edit the file with Terminal.app closed.