Create a main script Python 3


show more Creating a main script provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training show less
please wait ...

Creating a main script

As we go through the examples in this course, and as you look at scripts that you find from different sources, and as you write your own scripts, you are going to notice a few things that are constant in how these scripts are constructed. If we look at the syntax.py file here in our 04 Syntax folder in Exercise Files, you will notice a few things. First of all, at the very top, there is this line with a Pound sign, which is the Comment Indicator in Python and an exclamation point and then a path to the Python Interpreter.

This is used in environments that run the script from a shell, UNIX-based environments like a Mac or Linux environment, and one of the beauties of a scripting language like Python is that your script can run in a number of different environments without change. So it's important that you leave this as the first line of the file. Now this path here that starts with the first slash must be the path to the Python Interpreter. Now this is a very common path: /user/bin/ py...

Creating a main script
Video duration: 3m 27s 6h 36m Beginner

Viewers:

Creating a main script provides you with in-depth training on Developer. Taught by Bill Weinman as part of the Python 3 Essential Training

Subjects:
Developer Web
Software:
Python
Author:
please wait ...