1 Star 1 Fork 1

风的灵动/bcloud

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
bcloud-gui 823 Bytes
一键复制 编辑 原始数据 按行查看 历史
LiuLang 提交于 2015-05-12 01:34 . Update contributors list
#!/usr/bin/env python3
# Copyright (C) 2014-2015 LiuLang <gsushzhsosgsu@gmail.com>
# Use of this source code is governed by GPLv3 license that can be found
# in http://www.gnu.org/licenses/gpl-3.0.html
import os
import sys
import time
from bcloud.App import App
LOG_INTERVAL = 30 * 86400 # 30 days
def main():
# handle errors
logfile = os.path.expanduser('~/.config/bcloud/bcloud-stderr.log')
dirname = os.path.dirname(logfile)
if not os.path.exists(dirname):
try:
os.makedirs(dirname)
except Exception:
sys.exit(1)
if (os.path.exists(logfile) and
time.time() - os.stat(logfile).st_ctime > LOG_INTERVAL):
os.remove(logfile)
sys.stderr = open(logfile, 'a')
app = App()
app.run(sys.argv)
if __name__ == '__main__':
main()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/king019/bcloud.git
git@gitee.com:king019/bcloud.git
king019
bcloud
bcloud
master

搜索帮助