Additional style cleanup
[mudpy.git] / lib / mudpy / __init__.py
1 # -*- coding: utf-8 -*-
2 u"""Core modules package for the mudpy engine."""
3
4 # Copyright (c) 2004-2011 Jeremy Stanley <fungi@yuggoth.org>. Permission
5 # to use, copy, modify, and distribute this software is granted under
6 # terms provided in the LICENSE file distributed with this software.
7
8
9 def load():
10     u"""Import/reload some modules (be careful, as this can result in
11         loops)."""
12
13     # pick up the modules list from this package
14     global modules
15
16     # iterate over the list of modules provided
17     for module in modules:
18
19         # attempt to reload the module, assuming it was probably imported
20         # earlier
21         try:
22             exec(u"reload(%s)" % module)
23
24         # must not have been, so import it now
25         except NameError:
26             exec(u"import %s" % module)
27
28 # load the modules contained in this package
29 modules = [u"data", u"misc", u"password", u"telnet"]
30 load()