Get python script to run on boot up in mac

ぃ、小莉子 提交于 2020-01-14 09:32:50

问题


How would I get a python script to run everytime the computer boots?


回答1:


How to run a shell script on startup (OSX)

And in that script just call your program

python path/to/yourScript.py

EDIT: Since 2010 the above link has gone sour. But also since 2010 have some answers popped up the describe similar methods, eg.

Running script upon login mac

How to get shell scripts to run on startup - Yosemite




回答2:


You could create a login hook (be careful, it runs as root)



来源:https://stackoverflow.com/questions/4495949/get-python-script-to-run-on-boot-up-in-mac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!