Sometimes you may come across a Python script that you’ll need to run on your Mac in order to perform a specific task. For instance, I recently came across wp2tumblr, a Python script that allows you to import a WordPress blog into Tumblr. While I thought this was a great find, I suddenly realized that I had no clue how to actually run it on my Mac.
So, if this ever happens to you, here’s a quick tip on how to run a Python script in Mac OS X.
1. Open the folder (via Finder) where you have the script saved, so that you can refer to it’s name.
2. Open Terminal on your Mac and enter this command:
“Name” refers to the actual name of the script (ie. wp2tumblr.py -> python wp2tumblr.py)
3. In my case, instructions on how to use the script were be displayed right in Terminal. All I had to do was follow along and further execute the script as instructed.
So there you have it. Running a Python script in Mac OS X is quick and easy to do.
Image Credit: kojihachisu