Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the open source application UliPad to edit restructured text files (rst). It is a Python application that I launch via Terminal like so:


I have python32 as an alias to the 32bit install of Python on my machine. I have several versions installed.

First I would like a way to launch UliPad like other OS X apps. Not really sure how to do this.

Secondly, I would like to set all .rst files to be opened with Is there a way to do this? I know how to choose the default app in Finder but not sure how to choose UliPad as that app.

share|improve this question
up vote 2 down vote accepted

For your second question, according to How to associate the “.exe” extension to be opened with Mono?, you need an .app bundle:

Apparently, when using Finder's GUI, only .app files (application bundles) can be selected.

If that's true for Python scripts as well, then my answer at that question might help, with for Step 5:

5. Replace echo "$f" with python32 "$f"

So, in short, create an Automator "application" to run the following Shell script:

if [ $# -eq 0 ]
  # No parameters passed; just run it without any files:
  # Run an instance for each file:
  for f in "$@"
    $PYTHON $ULIPAD "$f"

...or maybe you can pass multiple files to in one go:


As for your first question: you should be able to use the same Automator "application" to just start UliPad without opening any file (if indeed you then just need to run it without any parameters, like I assumed above).

share|improve this answer
@Arjan, Thanks, I am not sure if Automator uses the .bash-profile with the python alias "python32", I ended up using the actual path to python, and of course the actual path was needed for i.e. for f in "$@" do /Library/Frameworks/Python.framework/Versions/6.1/bin/python/ /Users/vmd/Dropbox/Ulipad/ "$f" done – Vincent Apr 25 '10 at 20:27
@Vincent, glad it worked. I added an additional if [ $# -eq 0 ] in case no files are selected. That should make the "application" start if you just double-click the .app bundle from Finder. – Arjan Apr 25 '10 at 21:37
Nice update. One thing I am noticing is that the automator "gear" in the menu bar keeps spinning after ulipad has opened the file. i.e. Automator keeps running so I think it need to me closed. I can probably figure out how but you might what to add it to this great answer. – Vincent Apr 25 '10 at 23:11
@Vincent, you might be able to circumvent that by running Python in the background. That gives Automator control right away. Add an ampersand (&) after the two command lines to do that. So: $PYTHON $ULIPAD & and $PYTHON $ULIPAD "$f" &. Thanks for reporting back! – Arjan Apr 26 '10 at 5:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .