看板 [ Python ]
討論串[問題] 如何透過另一個py檔來run?
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓3(3推 0噓 3→)留言6則,0人參與, 最新作者demonxxx (demon)時間13年前 (2012/08/02 19:20), 編輯資訊
0
0
0
內容預覽:
x.py. import test. class x:. def xxx(self):. ???. xxx(). ???這裡我需要下什麼指令才可以透過x.py去run test.py ?. 我如果使用execfile("path-to-test.py"),不會error也不會run. --.

推噓2(2推 0噓 4→)留言6則,0人參與, 最新作者demonxxx (demon)時間13年前 (2012/08/01 15:31), 編輯資訊
0
0
0
內容預覽:
test.py. class test(xxx.xxx):. def xxx(self):. self.xxx.xxx(). if __name__ == "__main__":. xxx.main(). 我單獨run test.py是可以的。. 我想寫一個py檔去呼叫test.py來run,我該如
首頁
上一頁
1
下一頁
尾頁