pycharm 默认的【新建】文件,格式想指定自己的一些信息,比如:编码、自己的信息、新建时间等,那么就需要改一下文件模板。
具体步骤是(我这里是 专业版,社区版未知):
1.【File】-->【Settings...】,打开设置界面
2. 在搜索框处,输入 File
3. 然后在搜出来的结果处,点击【File and Code Templates】,选择对应要建立的文件,之后就可以改新建文件的模板了
# example
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: yinzhuoqun
@site: http://zhuoqun.info/
@email: yin@zhuoqun.info
@time: ${DATE} ${TIME}
"""
# 效果
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: yinzhuoqun
@site: http://zhuoqun.info/
@email: yin@zhuoqun.info
@time: 2019/4/22 15:22
"""
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有