Python Code Editor
Intelligent Code Editor
Syntax highlighting — customizable editor colors for Python code and Django templates. Several predefined color themes.
Auto-Indentation and code formatting — automatic indents inserting on new line. Indents verification and code re-formatting according to project code-style settings.
Code completion for keywords, classes, variables, etc. as you type or via Ctrl-Space. Editor suggestions are context-aware and suggest most appropriate options.
Line and block commenting — single keystroke to comment/uncomment current line or selection
On-the-fly error highlighting — errors are shown as you type. Integrated spell-checker verifies your identifiers and comments for misspellings.
Code snippets — save time using advanced customizable and parametrized code templates and snippets.
Code folding, auto-insertion of braces, brackets & quotes, Matching brace/bracket highlighting, etc.
Easy Code Navigation & Search
Go to class / file / symbol — crucial operations for fast project navigation. Use wild-cards and abbreviations to locate needed items faster.
Go to declaration — when invoked from a reference, opens the corresponding file and navigates to the symbol declaration.
Find Usages — helps you locate usages of any symbol (e.g., class, method, field, etc.) in your code, in the current file or in the whole project.
Numerous code inspections verify Python code as you type and also allow inspecting the whole project for possible errors or code smells.
Quick-fixes for most inspections make it easy to fix or improve the code instantly. Alt+Enter shows appropriate options for each inspection.
Configurable language injections
Language injections allow you to natively edit non-Python code, which is embedded into string literals, with code completion, error-highlighting, and other coding assistance features.
Rename refactoring allows to perform global code changes safely and instantly. Local changes within a file are performed in-place. Refactorings work in plain Python and Django projects.
Use Introduce Variable/Field/Constant and Inline Local for improving the code structure within a method, Extract Method to break up longer methods, Extract Superclass, Push Up, Pull Down and Move to move the methods and classes.
Quick definition / documentation view — see the object definition or documentation in-place without losing your context.
External documentation view in browser for Python standard library, Django and Google App Engine (Shift-F1).
Epydoc and reStructuredText markup highlighting and code completion for tags and tag parameters. Docstrings and the code matching verification, and autoupdate on refactoring.
Automatic generation of a docstring stub (either Epydoc or reStructuredText) for a method.
Django Templates Editing
While working with Django projects you can use all standard editor actions provided by JetBrains IDEs and rely on appropriate assistance, starting from syntax/error highlighting to advanced refactorings.
Code completion works for Django tags, filters, template variables and parameters passed from view methods.
Quick documentation lookup shows information for tags and filters.
Inspections verify you code for duplicate block names, tags open-close structure, unresolved template references, etc.
Time-saving editor actions include: automatic code formatting and indentation, code snippets/live templates, brackets and quotes autoclosing, code commenting and "Surround with tag" options.
Django-Specific Code and Files
Code insight for Django models and fields: navigation, autocompletion with type inference.
Special coding assistance within standard files:
settings.py: files, folders, view methods, templates navigation and autocompletion, regexp injection and highlighting. Intentions to create view and template from usage.
Internationalization (i18n) options allow quick extraction of strings to resource bundles with automatic code update. Easy navigation is available between string references and its value.
Other Templating Languages
Mako and Jinja2 can also be used for any project with syntax highlighting, code completion, formatting, quick navigation and Structure view.
Django Templates Debugging
PyCharm allows setting breakpoints inside Django templates. Stop your web application right where you need,
for a detailed code step through.
CoffeeScript & TypeScript
PyCharm offers a powerful CoffeeScript & TypeScript editor with features like syntax highlighting with error checking, code completion and coding assistance, code formatting and quick navigation.
Advanced features are also available and include code inspections, usages search and refactorings.
Run, Debug, Test
Run Your Code
You can run any Python file. Just right-click what you need to run and select 'Run <your script>'.
You can run REPL or Django consoles in PyCharm that offer many advantages over the standard ones: on-the-fly syntax check with inspections, braces and quotes matching and pairs autoinsertion and of course code completion. Both consoles are easy to locate under Tools menu.
You can execute tasks from your
manage.py file. Use 'Run manage.py task' action, enter a task name or event part of it and select the one you need. Debugger is started the same way.
PyCharm allows easily configure the required Python environment for your project, be it local, remote interpreter or a virtualenv.
Smart Step Into action in the debugger, allows you to select a call to step into, when the current line contains multiple method calls.
PyCharm can debug applications that spawn multiple Python processes (e.g. Django applications that don't run in --no-reload mode, or applications using many other Web frameworks that use a similar approach to code auto-reloading).
Every script/test or debugger execution creates a special 'Run/Debug Configuration' that can be edited and used later. Run/Debug Configurations can be shared with project settings for use by the whole team.
Create setup.py quickly using a special dialog and easily launch tasks defined inside setup.py.
Test Your Code
PyCharm IDE lets you run your tests: a test file, a single test class, a method, or all tests in a folder. You can observe results in graphical test runner with execution statistics and simple test-code navigation.
The test runner also works for Django applications, with support for unit tests, doctests, nose, and attest.
Code coverage analysis is added based on Ned Batchelder's coverage.py tool.
Google App Engine & other Frameworks & Libraries
Python Development for GAE
Develop applications for Google App Engine and delegate routine deployment tasks to the IDE. Create your app, run it and deploy it to the App Engine server without leaving PyCharm. Enjoy code completion and error highlighting in GQL queries and in YAML configuration files.
PyCharm provides smart
code insight for the SQLAlchemy library, resulting in intelligent code suggestions and automatic completion. SQLAlchemy diagrams complement the support of this handy SQL toolkit by visualizing your data structure.
PyCharm takes care of all your
routine tasks so you can enjoy developing with your framework of choice. Naturally, we provide Pyramid-aware code completion, automatic setup for run configurations, code navigation, and more. Chameleon, a template language commonly used for Pyramid projects, is also supported.
PyCharm recognizes existing web2py projects and can automatically create new ones. It understands the web2py internal template language, offers framework-specific code completion, helps you easily navigate around your project, and does all the routine stuff. All that's left for you is to simply enjoy developing with web2py.
PyCharm provides Cython coding support with:
- Syntax highlighting, error checking and code formatting
- Context-sensitive code completion for Cython keywords, fields of structs, and attributes of extension types
- Code navigation and Structure view
- Quick Usages Search and refactoring tools
- Code inspections for Cython such as unresolved references detection.
You can set up an external tool for compiling your Cython code from the IDE.
Python Desktop Development
Desktop development support with wxPython, PyQt, PyGTK
Integrated Development Environment
Embedded local terminal
This feature is what makes our Python Development Environment complete. No need to leave the IDE as you develop. Local terminal is available for any supported OS.
Version Control Integration
The following VCS are supported out of the box: Mercurial, Subversion, Git, CVS, Perforce.
A unified UI for common tasks also includes support of features specific for each VCS.
All the tedious tasks (adding, removing, deleting files) are performed automatically. A built-in visual merge tool resolves all conflicts in a quick and intuitive manner. The changes made locally are highlighted as you type in the editor gutter, providing intuitive navigation and a 2-click rollback for individual changes.
The following features are available no matter which VCS you use:
- Integrated changelists — group your changes into multiple change lists for better organization
- Shelved changes — set aside some changes to restore them later
- Repository changes view — see what has been committed by other team members
- Incoming changes view — see the code changes not yet integrated into your local copy
- Outdated changes notification — get warned that a file you are working with has been changed after your last sync
Keyboard Schemes / Vim Emulation
For a higher productivity PyCharm encourages you to use the keyboard for all your tasks.
For an easier start with PyCharm, try the keyboard hotkeys you already know well. PyCharm's keyboard layout is designed with your convenience in mind, but you can always choose specific layouts such as those from Eclipse or Visual Studio, or just create your own.
Additionally, PyCharm offers (via a plugin) a powerful VI/Vim emulation mode giving you the best of both worlds.
Are there any software developers who don't like to tweak their tools? We have yet to meet one, so we've made PyCharm UI customization a breeze. Have plenty of screen estate? Turn the toolbars and pin the tool windows to always show. Coding on a 13" MacBook Air? Leave only editor displayed and show the rest only when needed.
Editor Color Themes
UI customizations would be incomplete without an ability to configure the editor itself. PyCharm comes with several editor color schemes bundled and allows creating own custom schemes or modifying the existing ones.
Issue Trackers Integration
When your ToDo list is in an issue tracking system, you can configure PyCharm to work with the issues without switching from the IDE. Just specify your issue tracker server and:
- Select tasks to work on from the list defined by your filter
- Automatically group VCS changes under a corresponding task
- Commit to VCS with task name/ID pre-filled for you
- Switch between tasks keeping IDE context saved (open editor tabs, breakpoints, etc.)
PyCharm supports the following bug tracking systems: Atlassian JIRA, JetBrains YouTrack, Lighthouse, Pivotal Tracker, GitHub, Redmine, Trac.
More than 10 years of IntelliJ platform development gives PyCharm 50+ IDE plugins of different nature, including support for additional VCS, integrations with different tools and frameworks, and editor enhancements such as Vim emulation.
PyCharm plugins can be browsed and managed from the Plugin Manager in IDE Settings.