MAC版:PyCharm -> Preferences... -> Editor -> File and Code Templates -> Files -> Python Script
打开PyCharm->首选项->编辑器->文件和代码模板->文件->Python脚本
windows版:File -> settings -> Editor -> File and Code Templates -> Files -> Python Script
文件->设置->编辑器->文件和代码模板->文件->Python脚本
添加代码如下:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @File : ${NAME}.py
# @Author: ${USER}
# @Date : ${DATE}
新建文件:
选择Python File方式创建