【python】调用另一个python

方法1:Python自带模块函数os.system() 

os.system("python button1.py")
os.system("python 程序名称.py")

方法2:引用,同时把另一个程序函数化

import button1
button1.aaa()   

猜你喜欢

转载自www.cnblogs.com/dandanduba/p/12581460.html
今日推荐