How to reload python module imported using `from module import *`
问题 I saw in this useful Q&A that one can use reload(whatever_module) or, in Python 3, imp.reload(whatever_module) . My question is, what if I had said from whatever_module import * to import? Then I have no whatever_module to refer to when I use reload() . Are you guys gonna yell at me for throwing a whole module into the global namespace? :) 回答1: I agree with the "don't do this generally" consensus, but... The correct answer is: import X reload(X) from X import Y # or * for that matter 回答2: