Running scripts from Xcode
It's not terribly difficult to tell Xcode to launch a Python process and start your script. Create a custom executable, point it at Python, and set the arguments and environment variables appropriately. Detailed instructions are here:
StartupScript - A Python replacement for the Apple-provided example written in Perl. Install at ~/Library/Application Support/Apple/Developer Tools/
un_commentLines.py - A Python version of the Apple-provided "Un-Comment" script to be Python-aware. (You'll need to remove the shortcut in the first comment script.) Install at ~/Library/Application Support/Apple/Developer Tools/Scripts/10-User Scripts/30-Comments. [1/1/5] Fixed error with perl scripts, and added support for commenting applescripts.
And even scarier.. here's the MacPython/PyObjC class browser demo INSIDE Xcode. Just look at all those proprietary Apple classes:
The User Scripts feature is totally "borrowed" from TextExtras! Look at /System/Library/PrivateFrameworks/DevToolsInterface.framework/Versions/A/Resources/UtilityScripts -- it's *the same*.