Run Python Scripts on macOS

This section provides notes to verify Python version supported on macOS and run a simple Python interactive scripting session.

Python is becoming a popular scripting language for scientific applications now. macOS supports Python out-of-the-box. You don't have to do any installation.

You can start a Terminal window and try to run Python scripts interactively as shown below:

herong$ python --version
Python 2.7.10

herong$ python
Python 2.7.10 (default, Feb  6 2017, 23:53:20)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> print "Hello world!\n"
Hello world!

>>> exit()

Note that you need to call the "exit()" function to terminate the Python interactive session.

Table of Contents

 About This Book

 Macintosh OS (Operating System) History

 macOS Operating System

 macOS File Systems

 macOS Network Connections

 System and Application Processes

 Keychain Access - Password Manager

 Keychain Access - Certificate Manager

 Productivity Tools on macOS

Programming Tools on macOS

 Run Perl Scripts on macOS

 Install File::Util for Perl

Run Python Scripts on macOS

 Install New Version of Python on macOS

 pip3 - Package Installer for Python 3

 Run PHP Scripts on macOS

 Install MySQL Database Server on macOS

 PHP mysqli_connect() Error on "localhost"

 Install SQuirreL SQL Client on macOS

 Connect SQuirreL to MySQL on macOS

 Install SQuirreL SQL Scripts Plugins

 Apache Web Server on macOS

 Develop and Run Java Applications

 Full Version in PDF/EPUB