def __init__(self, *args, **kwargs):
cmd.Cmd.__init__(self, *args, **kwargs)
self.status = 'status'
path = [os.path.expanduser('~'), self.status,
'%s.yml' % self._get_next_monday().strftime("%B-%m-%d").lower()]
self.file = '/'.join(path)
if not os.path.exists(self.file):
file(self.file, 'w').close()
content = ''
with open(self.file, 'r') as fobj:
content = fobj.read()
self._d = yaml.load(content) or []
self.projects = self._get_projects()
评论列表
文章目录