Exemplo n.º 1
0
def main():

    m.f1()
    m.f2()
    m.f3()

    sys.exit()
Exemplo n.º 2
0
import module1
print("We are executing module1 from here")
print("__name__:")
module1.f1()
Exemplo n.º 3
0
"""
不同模块中调用相同名字的函数

Verison: 1.0
Author: 郑仁伟
Date: 2020-02-06
"""
from module1 import foo
foo()

from module2 import foo
foo()

from module1 import foo as f1
from module2 import foo as f2
f2()
f1()
Exemplo n.º 4
0
import module1
print("module1.x : " + str(module1.x))
x = 4
y1 = module1.f1(x)
y2 = module1.f2(x)
print("module2 -> (x, y1, y2) : " + str((x, y1, y2)))