python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
python [2016/05/24 10:24] – [Environment Variables] g00r00 | python [2023/01/08 12:01] – [Why Python 2] g00r00 | ||
---|---|---|---|
Line 8: | Line 8: | ||
Custom Python scripts can be executed by a menu command on any menu, and can also replace any prompt in a Theme' | Custom Python scripts can be executed by a menu command on any menu, and can also replace any prompt in a Theme' | ||
- | ==== Why Python | + | This is a full implementation of Python, meaning you can use external modules to accomplish just about anything alongside with many built in BBS-related functions for user input/ |
- | For those familiar with Python, it is important to note that Mystic uses the 2.x style of Python. | ||
- | * Better package support for Python 2.x | + | ==== Installation and Getting Started ==== |
- | * Python 2 is the default Python version used in the latest LTS versions of Ubuntu | + | |
- | * Python 2 is the default Python version used in the latest of Apple' | + | |
- | * Proven stability over many years in production environments | + | |
- | * The Python 2 syntax will not change, causing your scripts to break while the same cannot be said about Python 3 | + | |
- | ===== Installation and Requirements ===== | + | See the subsections |
- | + | ||
- | Mystic requires that Python 2.7 is installed on your system if you wish to execute Python scripts. | + | |
- | + | ||
- | Most Linux desktop distributions and Apple' | + | |
- | + | ||
- | **Note:** If you are using the 32-bit version | + | |
- | + | ||
- | ==== Environment Variables ==== | + | |
- | + | ||
- | In addition to the basic Python installation, | + | |
- | + | ||
- | One common error reported when this happens is a message " | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | SET PYTHONHOME=C: | + | |
- | SET PYTHONPATH=C: | + | |
- | SET PATH=%PYTHONHOME%; | + | |
- | + | ||
- | For more information on how to set environment variables, you'll need to research the | + | |
- | | + | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | When PYTHONHOME is set to a single directory, its value replaces both | + | |
- | | + | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | as the shell’s PATH: one or more directory pathnames separated by | + | |
- | | + | |
- | | + | |
- | + | ||
- | In addition to normal directories, | + | |
- | refer to zipfiles containing pure Python modules (in either source or | + | |
- | | + | |
- | + | ||
- | The default search path is installation dependent, but generally begins | + | |
- | with prefix/ | + | |
- | | + | |
- | + | ||
- | An additional directory will be inserted in the search path in front of | + | |
- | | + | |
- | can be manipulated from within a Python program as the variable sys.path | + | |
- | + |
python.txt · Last modified: 2023/01/20 01:07 by g00r00