Pycharm创建py文件时自定义头部模板

File->settings->Editor->File and Code Templates->Python Script

#!/usr/bin/env python
# -*- coding: utf-8 -*-
原文地址:https://www.cnblogs.com/zhangguanghe/p/8727185.html