PyCharm notes

Most of the notes should be applicable to the latest PyCharm version, but by historical reasons in the office I use PyCharm 3.4, so some of the notes might be related to it.

Auto-expanding import blocks

To make the import blocks expanded by default go to File -> Settings -> Editor -> Code Folding  and uncheck the Imports  check-box.

Explanation: by default the import section in the beginning of Python files is collapsed and for me having it expanded is much more convenient. Because modifying the import section is a common task that is often done manually. And clicking on a small expand/collapse icon is a bit annoying.

Adding a virtual environment (virtualenv) interpreter

Navigate to File -> Settings -> Project Interpreter , click the cog icon in the top-right corner and select Add Local . In the appeared file selection window navigate to your virtual environment directory select a Python executable (for example python2.7), which usually sits in the bin subfolder.

Leave a Reply

Your email address will not be published. Required fields are marked *