Site Configuration Files

A typical Python installation may include a number of third-party modules and packages. To configure these packages, the interpreter first imports the module site. The role of site is to search for package files and to add additional directories to the module search path sys.path. In addition, the site module sets the default encoding for Unicode string conversions. For details on the site module, see Chapter 13, “Python Runtime Services.”

Get Python: Essential Reference, Third Edition 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.