1.选择Pycharm-Preferences (Windows下为File-Settings)
2.选择File and Code Templates -> Files -> Python Script
3.填写你想要的头注释格式,例如:
# encoding: utf-8
"""
@author: suns
@contact: [email protected]
@time: ${DATE} ${TIME}
@file: ${NAME}.py
@desc:
"""
点OK。