2 """Skeletal executable for the MUFF Engine"""
4 # Copyright (c) 2005 MUDpy, The Fungi <fungi@yuggoth.org>, all rights reserved.
5 # Licensed per terms in the LICENSE file distributed with this software.
7 # muff uses the ini-style configs supported by the ConfigParser module
10 # need the sys module to alter the import path appropriately
14 """Find and return the main loop function"""
16 # figure out where to find our main configuration file
17 config_data = ConfigParser.SafeConfigParser()
18 config_dirs = [".", "./etc", "/usr/local/muff", "/usr/local/muff/etc", "/etc/muff", "/etc" ]
19 config_name = "mudpy.conf"
21 for each_dir in config_dirs:
22 config_files.append(each_dir + "/" + config_name)
24 # load the config file, get the module path and add it to sys.path
25 config_data.read(config_files)
26 module_path = config_data.get("files", "modules")
27 sys.path.append(module_path)
29 # import the main loop function
30 from muff.muffmain import main
33 # load the main loop and run it
34 main = get_main_loop()