hwkxk / HeytapTask

欢太商城每日签到Python脚本
MIT License
212 stars 114 forks source link

config.ini 文件位置定义 #30

Open anke1938 opened 3 years ago

anke1938 commented 3 years ago
    BASE_DIR = os.path.dirname(os.path.abspath(__file__))
    # 读取配置文件
    userconfig.read(os.path.join(BASE_DIR, 'config.ini'),encoding="utf-8")

这样写不会导致在cron 中找不到config 文件.

代码中的我在cron 中会报错 是否还有其他更好的解决方法

hwkxk commented 3 years ago

没试过,这个问题暂不清楚~