Using Python on Mac

The IDLE that comes with Python for Mac only gives you an interactive REPL (ie You type a line of Python and it executes it as soon as you hit Enter.). In order to run files, this is what you have to do.

  • Download Python 3.x from https://www.python.org/downloads/ and run the pkg file
  • Make a desktop shortcut to Python Launcher
  • Open up TextEdit and choose Format, Make Text Only
  • Write your Python program, e.g. print (“Hello World!”)
  • Save as HelloWorld.py
  • Find HelloWorld.py in a Finder window and drag it onto your new Python Launcher desktop shortcut
  • Bob’s your uncle

Alternatively you can find a full IDE. My understanding is that PyCharm is pretty good.

https://wiki.python.org/moin/IntegratedDevelopmentEnvironments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s