您的位置:首页技术文章
文章详情页

Eclipse配置python默认头过程图解

【字号: 日期:2022-07-27 13:47:44浏览:2作者:猪猪

eclipse 配置 python 默认头

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

Eclipse配置python默认头过程图解

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

Eclipse配置python默认头过程图解

(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”

Eclipse配置python默认头过程图解

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

Eclipse配置python默认头过程图解

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

Eclipse配置python默认头过程图解

Eclipse配置python默认头过程图解

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

在这里插入图片描述

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

Eclipse配置python默认头过程图解

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持好吧啦网。

标签: Python 编程
相关文章: