1、设置pycharm
setting -> File and Code Templates -> Python Script
2、写入代码头
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : ${DATE} ${TIME}
# @Author : Yellow_huang
# @Email : shgc123@163.com
# @File : ${NAME}.py
3、新建脚本
自带效果
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/06/2 15:15
# @Author : Yellow_huang
# @Email : shgc123@163.com
# @File : test.py