设置路径:settings—>Editor—>File and Code Templates —>Python Script

【Python】PyCharm设置新建python文件指定编码为utf-8

新建python文件,就会自动带上 

# -*- coding:utf8 -*-

【Python】PyCharm设置新建python文件指定编码为utf-8

相关文章: