Winpython Spyder template.py Template date format modification

Source: Internet
Author: User

Winpython The Spyder Editor default template file is template.py, where the date parameter is "% (date) S", when a new py file is created, the date format displayed is English and looks very unaccustomed.

The following method can be used to change the format of the date to "year-month-day time: minutes: Seconds" in the form, or other favorite format.

1. Open the C:\WinPython-64bit-3.4.3.4\python-3.4.3.amd64\Lib\site-packages\spyderlib\plugins\editor.py file with a text editor. This assumes that the Winpython is installed in the root directory of the C drive.

2. Move the cursor over 1524 lines.

3. Change "' Date ':" Time.ctime () "to" Time.strftime ("%y-%m-%d%h:%m:%s").

4, save the withdrawal.


Start the Spyder again, create a new py file, and the date format in the note has been changed to "2015-07-16 15:26:03" form.

This article is from the "happy366" blog, make sure to keep this source http://happy366.blog.51cto.com/2203682/1675310

Winpython Spyder template.py Template date format modification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.