1 """Core modules package for the mudpy engine."""
3 # Copyright (c) 2004-2018 mudpy authors. Permission to use, copy,
4 # modify, and distribute this software is granted under terms
5 # provided in the LICENSE file distributed with this software.
7 import importlib # 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("importlib.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 = ["command", "data", "misc", "password", "telnet", "version"]