How do you edit the default `__author__ = name` line in PyCharm

Question:

In pycharm, when making a new “Python File” it has some content by default:
__author__ = 'david'.

What I want to do, is changing this default content by the following shebang:

#!/usr/bin/env python
#-*- coding: utf-8 -*-

This way, when opening new python files on pycharm, this content above will already be there. How to do this?

Asked By: dvsaraiva

||

Answers:

In PyCharm, go to Preferences > IDE Settings > File and Code Templates and then click on the Python Script template and change it from the default to whatever you want.

Thanks for the question, I always thought the __author__ = blah was annoying but never took the time to learn how to fix it.

Answered By: garnertb

The menu path is now File > Settings > Editor > File and Code Templates. You might need to change it on multiple templates depending upon how many of your Python templates have this at the top.

Answered By: Palu Macil
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.