Pycharm在创建py文件时,自动添加文件头注释
依次
File -> Settings -> Editor -> File and Code Templates -> Python Script
添加以下代码:
# -*- coding: utf-8 -*-
# @Time : ${DATE} ${TIME}
# @Author : Herbert
# @Site : ${SITE}
# @File : ${NAME}.py
# @Software: ${PRODUCT_NAME}
参考地址:https://www.cnblogs.com/hugo07/p/5903885.html