Automatically add time, date and author information in Pycharm

1.pycharm→preference→Editor→File and code Templates 
Find Python Script on the right, as shown below

2. The configuration file is as follows:

##!/Users/wxl/anaconda3/bin/python3.7
# -*- coding: utf-8 -*-
# @Time    : ${DATE} ${TIME}
# @Author  : Mr wu
# @FileName: ${NAME}.py
# @Software: ${PRODUCT_NAME}
# @Blog    :https://blog.csdn.net/qq_15230053

3. Other available parameters

(A) Operating environment, interpreter

#!/usr/bin/python3

 (B) The predefined variables shall be expanded to corresponding values ​​in the format of ${<variable_name>}.

 The available predefined file template variables are:

 $ {PROJECT_NAME}-The name of the current project.

 ${NAME}-The name of the new file specified in the "New File" dialog box during file creation.

 $ {USER}-the login name of the current user.

 $ {DATE}-the current system date.

 $ {TIME}-Current system time.

 ${YEAR}-This year.

 $ {MONTH}-current month.

 ${DAY}-the current day of the month.

 ${HOUR}-current hour.

 ${MINUTE}-current minute.

 ${PRODUCT_NAME}-The name of the IDE in which the file will be created.

 ${MONTH_NAME_SHORT}-The first 3 letters of the month name. Example: January, February, etc.

 ${MONTH_NAME_FULL}-Full name of the month. Example: January, February, etc.

 

Intelligent Recommendation

In the newly created python file-automatically add time, date, author, tool and other information-pro-test effective

In the long coding process, it is always inevitable to add your own information, write it yourself! Time-consuming and laborious is not efficient. If you want to be efficient, you only need to configu...

Java's idea, when creating a new Java class, automatically add information such as author name and date and time in the file header

Java's idea, when creating a new Java class, automatically add information such as author name and date and time in the file header When we use Java's idea to create a new class, we hope to automatica...

How pycharm automatically adds header comments, such as time, author information, etc.

Record that you have stepped on it, just to find a place to save. Find the path: File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python -- coding: utf-8 -- @T...

How to automatically generate time, author and other information in pycharm

Today, a new intern in the company saw some time and author information when reading the project code, and asked me how to automatically generate these. I cut a picture to him, just add it in the pyth...

How to automatically add author and date information when creating a script in Unity

Article Directory 0. Effect 1. Find the template file of the script created by Unity on the hard disk and modify it 2. Create an Editor folder in Unity and put Copy.cs 0. Effect When multiple people a...

More Recommendation

Pycharm new template to add author time and other information by default

In the process of using pycharm, it is convenient to use the template for the shebang line of each new file and some personal information about the code writer. Methods as below:   1.Open pycharm, sel...

Pycharm new PY files add time author description and other information

Overview PycharmuseVTL(Velocity Template Language)The grammar rules are designed to design templates, and we will summarize template syntax in Python. Example Win:Ctrl + Alt + S (Mac:Cmd + ,Open Setti...

Automatically add file author, creation time and other information in vim

1. Linux system version: centos7 (other versions can also be used) 2. Open: vim ~/.vimrc Add the following content at the end of the file, the code is as follows 3. After creating a new file, directly...

Automatically add author information and time when idea creates a file

One, 1、File -> Settings 2、Editor -> File and Code Templates ->  Includes ->File Header    2. This is the comment content you defined here will appear when you enter aaa in t...

Automatically add author, time, copyright information when Vim files

In the work, engineers who engage in operations tend to write or improve the automation script, they will manually add header annotations, such as copyright statements, role, time and other informatio...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top