Crossfire Server, Trunk
python_init.py
Go to the documentation of this file.
1 import Crossfire
2 import os.path
3 import sys
4 
5 Crossfire.Log(Crossfire.LogDebug, "Running python initialize script.")
6 sys.path.insert(0, os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python'))
7 
8 path = os.path.join(Crossfire.DataDirectory(), Crossfire.MapDirectory(), 'python/events/init')
9 
10 if os.path.exists(path):
11  scripts = os.listdir(path)
12 
13  for script in scripts:
14  if (script.endswith('.py')):
15  exec(open(os.path.join(path, script)).read())
CFBank.open
def open()
Definition: CFBank.py:69