当前位置:主页 > 软件编程 > Python代码 >

Eclipse配置python默认头过程图解

时间:2021-06-08 07:44:55 | 栏目:Python代码 | 点击:

eclipse 配置 python 默认头

打开eclipse 点 窗口(Windows)->首选项(Preferences)

Preferences窗口,点 PyDev --> Editor --> Templates,再点右上角的新建(New),进入新增模板窗口(New Template)

(New Template)" 窗口,name输入:pythonhead; Description输入:“注明文件编码,版本号,时间,作者” ; Pattern输入:

#!/usr/bin/python3
# encoding:utf-8
'''
Created on ${currentDate:date('yyyy-MM-dd HH:mm')}
@author: ${user}
'''

(Context)选“New Module",Automatically insert前打勾,输入选择完毕,点击“OK”

新建完成之后,返回Preferences窗口,点击“Apply and Close”按钮

回到主界面,新增新py文件

选择“pythonhead”,点击“OK”!

在这里插入图片描述

最终得到结果,新建的pythontest.py,头部位置默认有如下图内容

您可能感兴趣的文章:

相关文章