Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
__name__ == '__main__'当您使用 cronjob 运行 Python 脚本时?
__name__ == '__main__'
如果它是 python 进程的入口点,那么是的。
是的,只要你不导入它,它就是'__main__'.
'__main__'