1.点击file--Settings
2.选择Editor,打开File and Code Templates3.点击Python Script
4. 在输入框中,输入作者信息,点击ok按钮
# -*- coding: utf-8 -*-
"""
@Time : ${DATE} ${TIME}
@Auth : 晚凉
@File :${NAME}.py
@IDE :${PRODUCT_NAME}
@Motto:咕咕嘎嘎
"""
其中$为引用符;${DATE}为当前日期,${TIME}为当前时间(时分)
${NAME}为当前文件的名字
${PRODUCT_NAME}为文件名
5.设置完毕后,当创建新的py文件时,就会生效
扫描二维码关注公众号,回复:
15580651 查看本文章