Name

scripts

Synopsis

scripts=[ list of script file path strings ]

Scripts are Python source files meant to be run as main programs (generally from the command line). The value of the scripts keyword lists the path strings of these files, complete with .py extension, relative to the distribution root directory.

Each script file should have as its first line a shebang line, that is, a line starting with #! and containing the substring python. When distutils install the scripts included in the distribution, distutils adjust each script’s first line to point to the Python interpreter. This is quite useful on many platforms, since the shebang line is used by the platform’s shells or by other programs that may run your scripts, such as web servers.

Get Python in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.