Py默认生成模板
in PyCharm with 0 comment
Py默认生成模板
in PyCharm with 0 comment

学习Python时离不开使用相关编译器,良好的开头注释是一个程序员该有的基本素养

初创HTML文件时,会有基本的身体构造,因为调用默认的模板,那么Py也有,本文通过修改默认模板进行使脚本大众化

过程

这里以PyCharm为例
--> 打开左上角File --> Settings
1.png
-->Editor-->filr and Code Templates -->选择Python script右侧编写默认模板
@08@NWDJ`WR~@@TKHD86MG1.png
填写以下代码

# -*-  coding = utf-8 -*-
# @Time : ${DATE}${TIME}
# @Autor : LceAn
# @File : ${NAME}.py
# @Software : ${PRODUCT_NAME}

PX1@{D%M36L9TPHE$KOKLAE.png

  1. 第一行是告诉编译器该文件使用的是UTF-8协议
  2. 第二行是显示创建该文件时的时间
  3. 第三行是创建所属者
  4. 第四行是该文件创建时命名
  5. 第五行是该文件是当前开发环境是用什么IDE写的

保存之后应用,再次创建py文件时就能看到效果


你不是程序员,你只是让简单的事情自动化。


Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 109

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 111

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 113

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 115

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 117

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 119

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 121

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 123

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 125

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead in /www/wwwroot/ae.lcean.com/usr/themes/pinghsu-master/post.php on line 127
Responses