from X import Y
import imp
print(Y())
print(Y())
imp.reload(X)
import X
print(Y())
print(X.Y())
imp.reload(X)
print(Y())
print(X.Y())
from X import Y
print(Y())
Python: reload component Y imported with 'from X import Y'?