您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

17 行
426B

  1. from datetime import date
  2. from os import path
  3. def createfile():
  4. filenames = ["1Start","2Middle","3End"]
  5. todaystr = date.today().strftime("%y%m%d")
  6. if date.today().weekday() < 5:
  7. for filename in filenames:
  8. try:
  9. with open("journal/"+todaystr+"_"+filename,"x") as fh:
  10. pass
  11. except:
  12. pass
  13. if __name__ == '__main__':
  14. createfile()