python
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
python [2016/05/24 10:30] – g00r00 | python [2017/12/30 16:55] – [Introducing Python] g00r00 | ||
---|---|---|---|
Line 7: | Line 7: | ||
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' | ||
+ | |||
+ | 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/ | ||
==== Why Python 2 ==== | ==== Why Python 2 ==== | ||
- | For those familiar with Python, it is important to note that Mystic uses the 2.x style of Python. | + | 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 | * Better package support for Python 2.x | ||
Line 18: | Line 20: | ||
* The Python 2 syntax will not change, causing your scripts to break while the same cannot be said about Python 3 | * The Python 2 syntax will not change, causing your scripts to break while the same cannot be said about Python 3 | ||
- | ===== Installation and Requirements | + | ==== Installation and Getting Started |
- | + | ||
- | 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 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, | + | |
- | + | ||
- | 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 | + | |
+ | See the subsections of this documentation for information on installation, |
python.txt · Last modified: 2023/01/20 01:07 by g00r00