Pycharm设置Templates 1.选择File下的settings 2.选择File and Code Templates然后在选择Python Script,在右侧的框中输入 #__author:${USER} 自动获取用户名 #date: ${DATE} 自动获取时间 最后点击Apply