2

When I create a file with pycharm I want it to automatically have the following lines

from __future__ import unicode literals
import logging
from common import const

log = logging.getLogger(__name__)

Is it possible to do this? These are the common lines in all project files

1 Answer 1

3

This is quite easy to do. Follow the steps:

Head over to File Templates and create a new Template like so:

enter image description here

Create a new file template

enter image description here enter image description here

Now create your new file

enter image description here

enter image description here

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Oops, I seem to have coped it the wrong way, my bad. But you should get an idea of what you need to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.