【发布时间】:2016-02-18 03:08:30
【问题描述】:
我将我的辅助方法组织成这样:
所有方法都在当前文件中使用,所以我需要像这样导入它们:
from helpers.utility_helper import *
from helpers.app_helper import *
from helpers.gmm_helper import *
from helpers.plot_helper import *
所以我可以直接在每个子模块中使用方法。例如,使用my_helper() 而不是helpers.utility_helper.my_helper()。
但这看起来很冗长,是否可以将它们组合成一行?有些东西可能看起来像
import * from helpers/*
【问题讨论】:
标签: python