我开发了执行某些操作的python 3.6.6控制台应用程序。这是我在此app.py文件中使用的结构:
#!/usr/bin/python3
import threading
import time
# My app content
if __name__ == '__main__':
# all may code is in here
Run Code Online (Sandbox Code Playgroud)
现在,我需要在执行其他操作的父应用程序中调用同一应用程序。我要在parent_app.py文件中放什么:
#!/usr/bin/python3
#some imports...
#the call to the app.py, but how since app.py hasn't got functions in it???
Run Code Online (Sandbox Code Playgroud)
感谢您对这个基本问题的帮助...正如您所见,我是Python新手;-)