我有几个不同的模块全部,例如:
if not __name__ == '__main__':
try:
logger = logging.getLogger()
except:
from MainApp.lib import setLogging
logger = setLogging.initLogging("install.log")
else:
from MainApp.lib import setLogging
logger = setLogging.initLogging("install.log")
setLogging.enableDebugLogging()
是否有可能在__init__.py级别定义所有这些内容?