在pycharm上依次选择打开File->settings->Editor->File andCode Templates->Python Script
复制以下模板内容:
#!/usr/bin/env python # encoding: utf-8 #set( $SITE = "http://blog.csdn.net/hqzxsc2006" ) """ @version: v1.0 @author: Lieb @license: Apache Licence @contact: 2750416737@qq.com @site: ${SITE} @software: ${PRODUCT_NAME} @file: ${NAME}.py @time: ${DATE} ${TIME} """ def func(): pass class Main(): def __init__(self): pass if __name__ == "__main__": pass
以上这篇创建pycharm的自定义python模板方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。