def a(c):
    global b;
    b=c

def d():
    print(b)

然后再:

#encoding=gbk 
import 测试
测试.a(56)
测试.d()

py文件模块作为,避免恶心的self.完全是可行的.