This is just a quick how-to on creating a launcher for the IPython Qt console on Mac OS X.
- Open up AppleScript Editor and enter the following:
do shell script "cd ~; /usr/local/bin/ipython qtconsole --pylab"
Check that the path to ipython is correct for you by running
which ipython
from the terminal. You can also change the starting directory if you wish. - Save the script with the name IPython and file format Application in
/Applications/
- You should now be able start an IPython Qt console from Spotlight or Launchpad, just like any other app. But you’ll notice two things: the Launchpad icon is the AppleScript icon, and after launch you’ll have both IPython and AppleScript icons in your dock. Let’s fix that.
- The icon for the IPython Qt console resides in your Python distribution’s site-packages at
IPython/qt/console/resources/icon/IPythonConsole.svg
. We’ll need to convert it to an.icns
file. I used iConvert Online to do this, and I’ve made the result available here - Replace
/Applications/IPython.app/Contents/Resources/applet.icns
with the .icns file from the previous step. - Edit
/Applications/IPython.app/Contents/Info.plist
and add the following lines after the first<dict>
<key>LSBackgroundOnly</key> <string>1</string>
That’s all. The only drawback to this method is that it doesn’t allow you to pin IPython to the dock and launch it from there, if anyone figures out how this can be done please let me know.
Thanks !
“The only drawback to this method is that it doesn’t allow you to pin IPython to the dock and launch it from there.”
Here’s an idea to address that: https://github.com/masonlr/jupyter-qtconsole-launcher