pycharm中设置自己的文件模板
File>>Settings>>Editor>>File and Code Templates
选择文件类型Python Scripts,输入文件模板类型
#!/usr/bin/env python # encoding: utf-8 """ @version: ?? @author: xushuang @software: ${PRODUCT_NAME} @file: ${NAME}.py @time: ${DATE} ${TIME} """ def func(): pass class Main(): def __init__(self): pass if __name__ == '__main__':