User Tools

Site Tools


python

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
python [2016/03/27 09:36] – [Environment Variables] g00r00python [2017/12/30 16:55] – [Introducing Python] g00r00
Line 2: Line 2:
  
  
-===== About =====+===== Introducing Python =====
  
 Mystic BBS has an embedded Python engine which allows for an incredible amount of flexibility when it comes to creating modifications to BBS functionality, or even creating your own games. Mystic BBS has an embedded Python engine which allows for an incredible amount of flexibility when it comes to creating modifications to BBS functionality, or even creating your own games.
  
 Custom Python scripts can be executed by a menu command on any menu, and can also replace any prompt in a Theme's prompts file so that the script is executed instead of the prompt that normally we have been displayed.  Python scripts can also be executed by MPL scripts and even other Python scripts as well. Custom Python scripts can be executed by a menu command on any menu, and can also replace any prompt in a Theme's prompts file so that the script is executed instead of the prompt that normally we have been displayed.  Python scripts can also be executed by MPL scripts and even other Python scripts as well.
 +
 +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/output, user security, BBS database access, and so on.
  
 ==== 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.  Even though there is a 3.0 version, the 2.x line was selected for a pretty long list of reasons.  Here are some of them:+For those familiar with Python, it is important to note that Mystic uses the 2.x style of Python.  Even though there is a 3.0 version, the 2.x line was selected for a pretty long list of reasons at the time when support for Python was added into Mystic.  Here are some of reasons 2.x was selected:
  
   * 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.  The presence of Python is detected automatically by Mystic, and is initialized as needed.  It is not in any way a dependency and Mystic will continue to operate normally without it should you decide you do not wish to use it. +
-   +
-Most Linux desktop distributions and Apple's OS X will come with Python 2.7 installed by default, and in many cases no installation will be required in order to use Python.  In Windows, Python needs to be installed by downloading it from the Website: [[http://www.python.org|www.python.org]] +
- +
-**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.  If you are using the 64-bit version of Mystic then you need to have the 64-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.  If this step is omitted then Python will still work with the internal Mystic BBS functions, but any scripts that attempt to use a 3rd party module will fail. +
- +
-   Placeholder for environment information +
  
 +See the subsections of this documentation for information on installation, creating your first Python script, and a function reference.
python.txt · Last modified: 2023/01/20 01:07 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki