Running a python program from Terminal on Mac

  1. Run Terminal on Mac by pressing command+spacebar and typing in Terminal in the search bar
  2. On terminal change directory to where you saved your python file (file with .py extension) by using the “cd” command on terminal
  3. You can list the content of a folder using “ls” command
  4. Next using the command python followed by the file nameuser$ python hello.py

    python

Advertisements

One thought on “Running a python program from Terminal on Mac

Add yours

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 )

Google+ photo

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

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: