你不应该这样做。相反,要做到:
测试1。py:
def print_test(): print "I am a test" print "see! I do nothing productive."
服务py
#near the top from test1 import print_test #lots of stuff here print_test()