This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [mail] | |
| smtp_server = smtp.your-service.com | |
| to_addr = target@email.com | |
| from_addr = your@email.com | |
| nickname = nick-name | |
| password = your-password | |
| prefix = subject-prefix | |
| port = 25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from os import listdir | |
| from os.path import splitext, basename, isfile, isdir, join | |
| def GetFileList(dir, fileList): | |
| newDir = dir | |
| if isfile(dir): | |
| fileList.append(dir.decode('utf-8')) | |
| elif isdir(dir): | |
| for s in listdir(dir): | |
| # 如果需要忽略某些文件夹,使用以下代码 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def calculate(last_time, current_time): | |
| time_delta = \ | |
| datetime.datetime.strptime(current_time, '%M:%S.%f') -\ | |
| datetime.datetime.strptime(last_time, '%M:%S.%f') | |
| return str(time_delta)[2:-4] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sys | |
| def get_cur_info(): | |
| _ = sys._getframe() | |
| return (_.f_code.co_name, _.f_back.f_lineno) # funcname, lineno |
NewerOlder