How does pycharm automatically generate header comments

1. Select File -> Settings

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

edit code style

# !/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. Create a new Python file, and you can see that the header comment is automatically added!

Guess you like

Origin blog.csdn.net/qq_37768971/article/details/107934628