pycharm如何自动生成头部注释

1.选择File -> Settings

2.选择Color styles ->  File and Code Templates -> Files -> Python Script

编辑代码的样式

# !/usr/bin/python
# -*- coding: utf-8 -*-
"""
@File    :  ${NAME}.py
@Time    :  ${DATE} ${TIME}
@Author  :  SanZhang
@Version :  1.0
@Contact :  [email protected]
@License :  (C)Copyright 2019-2020
@Desc    :  None
"""

3. 新建一个Python文件,即可看到头部注释自动添加!

猜你喜欢

转载自blog.csdn.net/qq_37768971/article/details/107934628