Spyder modify the template template.py date format

Viewed 710

The editor Spyder comes with a default template file template.py, which shows the date parameter "% (date) s", when you create a new py file. How can I change the date format to the following method "year - month - day hour: minutes: seconds" format, or other format I like?

1 Answers

From the discussion of this issue in Spyder's repository, it appears that date is "hard coded in editor.py so you would have to change Spyder code." You can change line 1901 in spyder/spyder/plugins/editor.py to format the date as you desire.

'date': time.ctime()

Related