Python
This section provides descriptions of the Python-specific procedures that are used in projects of all supported types, and the procedures that pertain to the empty projects only.
In this section:
- Python
- Creating Empty Project
- Configuring Python SDK
- Installing, Uninstalling and Upgrading Packages
- Managing Dependencies
- Resolving References
- Using Python Skeletons
- Cleaning .pyc Files
- Profiler
- Thread Concurrency Visualization
Prerequisite
At least one Python interpreter is properly installed on your machine.
Python Support
PyCharm supports Python from version 2.4 up to the version 3.5.
PyCharm provides support for Python 3.5 with the backing of the following:
- PEP-0484 — Type Hints
- PEP 0448 — Additional Unpacking Generalizations
- PEP 0492 — Coroutines with async and await syntax
- and more.
Python support in PyCharm includes:
- Dedicated project type .
- Ability to configure local and remote interpreters and virtual environments.
- Python console.
- Run/debug configurations for Python, and Python remote debug.
- Code inspections.
- Intention actions.
- Code completion and resolve.
- Built-in code formatter and separate set of Python code style settings.
- Find usages in Python code.
- Testing frameworks.
- Quick documentation.
- Recognizing Python documentation comments.
- Documentation generators
- Configuring Python debugger.
Note that the debugger contains speedup modules, which use Cython and are generated with a few changes in the regular files to cythonize the files. The Cython speedups are available for CPython versions 2.7, 3.4 and 3.5.
- On Windows the compiled Cython extensions are bundled to PyCharm.
- On Linux and Mac OS, Cython extensions should
be compiled manually in one in two possible ways:
- by clicking the link that appears in the warning after the first debugger launch.
- by running the command from the warning manually in the terminal. A separate Cython extension should be compiled for each version of Python interpreter.
If someone doesn't want to use Cython extensions for some reasons, the environment variable
PYDEVD_USE_CYTHON=NO
should be passed.
- UML Class diagrams for Python classes.