setup_bot.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:AFSCbot 作者: HadManySons 项目源码 文件源码
def open_pid():
    # Get the PID of this process
    # Exit if a version of the script is already running
    if os.path.isfile(PID_FILE):
        print_and_log("PID already open, exiting script", error=True)
        sys.exit(1)
    else:
        # Create the lock file for the script
        pid = str(os.getpid())
        open(PID_FILE, 'w').write(pid)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号