在pycharm上依次选择打开File->settings->Editor->File andCode Templates->Python Script
复制以下模板内容:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/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模板方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持服务器之家。
原文链接:https://blog.csdn.net/hqzxsc2006/article/details/53165208