打开pycharm,点击“file->Settings”

点击“Editor->File and Code Templates”

选择“Python Script”,增加以下内容

#!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time         : ${DATE} ${TIME}
# @Author       : baogui lu
# @Email        : lubaogui@lubaogui.com
# @File         : ${NAME}.py
# @Software     : ${PRODUCT_NAME}