1 # -*- coding: utf-8 -*-
2 """Core modules package for the mudpy engine."""
4 # Copyright (c) 2004-2013 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.
14 """Import/reload some modules (be careful, as this can result in loops)."""
16 # pick up the modules list from this package
19 # iterate over the list of modules provided
20 for module in modules:
22 # attempt to reload the module, assuming it was probably imported
25 exec("imp.reload(%s)" % module)
27 # must not have been, so import it now
29 exec("import mudpy.%s" % module)
31 # load the modules contained in this package
32 modules = ["data", "misc", "password", "telnet"]