Galcon 3: the third -- join the party
 
 

Classic :: Wiki :: Mods_Python

Home | Download | Buy | Forum | Net Ranks | Support


Home: Index
Page Up: Mods

import
- the only standard python modules available are math and random
- only one import per line "import galcon"
- "from galcon import *" won't work (note that galcon constants are already in the global namespace)
- import statements may only be at the top of your script, not in the middle of function definitions, etc.
- module names may not contain capital letters

builtins
- open, dir, type, and many other builtins have been disabled.  Generally, you can't access the file system (except using special limited API calls) and can't do much introspection
- svn://www.imitationpickles.org/pysafe/trunk is the code used to build the subset of python, check it out for more gritty details.

variables
- variables may not begin with _, contain __, or start with various reserved prefixes (f_, and more)
- method or function names may not contain __.  This means special methods (__add__, __str__, etc.) are not allowed.  (Exception: using the function __init__ is allowed)