21

How to change the default template for new modules in Spyder IDE?

# -*- coding: utf-8 -*-
"""
Created on %(date)s

@author: X
"""
Abdulrahman Bres
  • 2,603
  • 1
  • 20
  • 39

1 Answers1

41

Preferences > Editor > Advanced settings > Edit template for new modules

changing default docstring for modules in Spyder

Abdulrahman Bres
  • 2,603
  • 1
  • 20
  • 39
  • Your answer is not totally self-explanatory. It can benefit from a little more explanation. In the screenshot above the red rectangle "Edit template for new modules" is a non-obvious button that you must click with the mouse. It then opens up the "template.py" file in the Python editor. This edited file is located in the folder path "C:\Users\<>\.spyder-py3\template.py" When you edit the file, it gets saved back to this same file and location. – Rich Lysakowski PhD Oct 27 '22 at 05:14