python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python [2016/05/24 10:30] – g00r00 | python [2023/01/20 01:07] (current) – [Installation and Getting Started] 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 of this documentation for information |
- | + | ||
- | Mystic requires that Python 2.7 is installed | + | |
- | + | ||
- | Most Linux desktop distributions and Apple' | + | |
- | + | ||
- | **Note:** If you are using the 32-bit version of Mystic (even if it is in a 64-bit operating system), then you need the 32-bit version of Python installed. | + | |
- | + | ||
- | ==== Environment Variables ==== | + | |
- | + | ||
- | In addition to the basic Python installation, some environment variables need to be set so that Mystic can find and import 3rd party modules if you'd like to use within your Python programs. | + | |
- | + | ||
- | One common error reported when this happens is a message " | + | |
- | + | ||
- | **PYTHONHOME** and **PYTHONPATH** are two environment variables which need to be set. Depending on your operating system, Python may already be installed and working without making any changes. | + | |
- | + | ||
- | SET PYTHONHOME=C: | + | |
- | SET PYTHONPATH=C: | + | |
- | SET PATH=%PYTHONHOME%; | + | |
- | + | ||
- | For more information on how to set environment variables, you'll need to research the specific operating system that you are using. | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | 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.1464103807.txt.gz · Last modified: 2016/05/24 10:30 by g00r00