1 """Core modules package for the mudpy engine."""
3 # Copyright (c) 2004-2015 Jeremy Stanley <fungi@yuggoth.org>. Permission
4 # to use, copy, modify, and distribute this software is granted under
5 # terms provided in the LICENSE file distributed with this software.
7 import imp # noqa (referenced via exec of string literal below)
9 import mudpy # noqa (referenced via exec of string literal below)
13 """Import/reload some modules (be careful, as this can result in loops)."""
15 # pick up the modules list from this package
18 # iterate over the list of modules provided
19 for module in modules:
21 # attempt to reload the module, assuming it was probably imported
24 exec("imp.reload(%s)" % module)
26 # must not have been, so import it now
28 exec("import mudpy.%s" % module)
31 # load the modules contained in this package
32 modules = ["data", "misc", "password", "telnet"]