JetBrains Debuts PyCharm Educational Edition

If you’ve ever wanted to learn Python programming, get ready to be blown away.

Today we’re launching the free and open source PyCharm Educational Edition for students and teachers. This easy-to-use yet powerful Python IDE includes special interactive educational functionality to help novice programmers learn the craft and turn professional quicker than ever before! It combines the easy learning curve of interactive coding platforms with the power of a real-world professional tool.


Why PyCharm Educational Edition?

We all know that computer programming studies are one of today’s major global trends, driven by open-access, non-credit education. Python has long been used for educational purposes and is now the most popular language used to teach programming for beginners. We decided to create this new educational IDE, because we at JetBrains PyCharm, being a part of the Python community, are committed to providing quality, professional, seamless solutions for learning programming with Python, keeping the needs of both novice programmers and educators in mind.

What is so special about PyCharm Educational Edition?

In designing this tool we have been inspired by Guido van Rossum, the creator of the Python programming language, who said:

guido“We believe that there should be no clear-cut distinction between tools used by professionals and tools used for education—just as professional writers use the same language and alphabet as their readers!”

PyCharm is a professional tool recognized among professionals all around the globe. At some point it occurred to us that, with some work, its power could also be harnessed to serve educational purposes.

We analyzed educational trends and tools on the market carefully. To understand what should be improved in PyCharm and how to make it the best educational IDE possible, we polled hundreds of instructors from different universities all around the world.

We found out that there are two opposite approaches to learning programming. One is based on using interactive online educational platforms and editors, which are extremely easy to start with. Despite an easy learning curve, these are not real development tools, and once you get used to them it may be difficult to switch to a real development environment and develop something real. The other approach is centered around real code editors and IDEs tools. While advanced, they are often too complex for beginners. Instead of learning programming, you must invest considerable efforts and time just into understanding how the tool works, before actually learning the essentials of programming.

PyCharm Educational Edition aims to combine both these two worlds. We’ve made it easy to get started with, not intimidating, yet powerful enough to guide you all the way through to becoming a professional developer.

All the learning you need, for FREE

freePyCharm Educational Edition is absolutely free and open-source. Novice programmers can download and use it for educational or any other purposes—for free. Instructors and course authors can use it to create, modify and share their own courses.

Included are learning essentials like an integrated Python console, Debugger and VCS, along with unique educational features such as “fill in the missing code” exercises, intelligent hints, checks, smart suggestions, code auto-completion, and much more.

So, what’s inside, besides the PyCharm Community Edition?

  • Special new Educational project type. From a student’s point of view, an Educational project is like an interactive course that includes tasks and files for editing, and a Check button that gives instant feedback and scores your assignment. With this type of project, teachers can create courses or assignments with lessons and tasks, create exercise code, define expected results, write tests that will work in the background. In particular, they can employ the “fill in the missing code” educational technique where you ask a student to insert the correct code in an already existing code sample.
  • A greatly simplified interface to make the learning curve as easy as possible. The advanced tools are hidden by default and may be activated as you progress.
  • On Windows, Python is installed together with PyCharm, with no additional installation required. Linux and Mac OS installers automatically detect a system interpreter. All you need to start learning is just to install PyCharm.

Possible Applications

possiblePyCharm Educational Edition can be used in MOOCs, self-studying courses or traditional programming courses. In addition to going through interactive courses, you can also use normal Python projects and the integrated Python console, as well as the debugger, VCS, and everything else that PyCharm already offers.

What to do next?

Don’t wait any longer — download PyCharm Education Edition for your platform and start learning Python programming today!

For more details and learning materials, visit the PyCharm Educational Edition website and check the Quick Start guide to get rolling. Or, for a quick visual overview, watch this introductory video:

Then, get involved:

Read our blog to stay tuned for news, updates and everything that goes on with PyCharm Educational Edition. And do give us feedback on how we’re doing.

Did you know?
JetBrains recently launched the Free Student License program. With this program any student or educator can use any JetBrains product for free!

Develop with pleasure!
JetBrains PyCharm Team

Posted in Release Announcements | Tagged , , | 1 Comment

Second PyCharm 4 EAP: IPython notebook, Attach to process and more

Having announced the first Early Access Preview build of PyCharm 4 almost a month ago, today we’re eager to let you know that the second PyCharm 4 EAP build 139.113 is ready for your evaluation. Please download it for your platform from our EAP page.

Just as always, this EAP build can be used for 30 days starting from its release date and it does not require any license.

The most exciting announcement of this fresh preview and the whole upcoming release of PyCharm 4 is that the IPython notebook functionality is now fully supported in PyCharm!
It has been one of the most top voted feature requests in PyCharm’s public tracker for quite a long time and now we’re proud to introduce this brand new integration to you.

Note that the IPython Notebook integration is available in both PyCharm Community Edition and PyCharm Professional Edition.


Now with PyCharm you can perform all the usual IPython notebook actions with *.ipynb files. Basically everything that you got used to with the ordinary IPython notebook is now supported inside PyCharm: PyCharm recognizes different types of cells and evaluates them independently. You can delete cells or edit previously evaluated ones. Also you can output matplotlib plots or images:


When editing code inside cells, PyCharm provides well-know intelligent code completion as if it were an ordinary Python file. You can also get quick documentation and perform all other usual actions that can be done in PyCharm.
So with this integration we have great news – now you can get the best of both PyCharm and IPython Notebook using them together!
Please give it a try, and give us your feedback prior to the final release of Pycharm 4.

Stay tuned for future blog posts with detailed descriptions of this great feature!

Introducing a new feature – Attach to process

Another great feature of the second PyCharm 4 preview build is that Pycharm’s debugger can now attach to a process!

Note: the “attach to process” functionality is available in both PyCharm Community Edition and PyCharm Professional Edition

With PyCharm 4 you can now connect a debugger with any running python process and debug in the attached mode. All you need is go to Tools | Attach to Process.
PyCharm will show you the list of running python processes on a system. Just select the one you want to connect to and click OK:


From this point you can use the debugger as usual – setting breakpoints, stepping into/over, pausing and resuming the process, evaluating variables and expressions, and changing the runtime context:


Currently we support the attach to process only for Windows and Linux platforms. Hopefully we’ll add the support for Mac OS with the next EAP.
Also please note that on most Linux machines, attaching to a process is disabled by default. In order to enable it on a system level, please do

If you want it permanently, please edit /etc/sysctl.d/10-ptrace.conf (works for ubuntu) and change the line:

to read:

Check ptrace configuration for your Linux distribution accordingly.

Better package management

The other good news is the improved package management subsystem. It got smarter and now recognizes unmet package requirements better. It also has a better UI – showing progress on package installation and a Choose Packages to Install dialog:


In case of errors, PyCharm now has better reports that include suggested solutions:

Screenshot from 2014-10-16 20:44:05

Another good thing is that the JSON support now comes bundled with PyCharm 4 in both Community Edition and Professional Edition. That means JSON is now supported on a platform level and has separate code style and appearance settings as well as its own code inspections, etc.:


And finally one more useful feature that comes from the Intellij platform. The Code Style settings now offers a new option: Detect and use existing file indents for editing (enabled by default):


This new option lets Pycharm detect certain Code Style settings (such as Use Tab character and Indent size) in the currently edited file on the fly. It means that even if the file has its code style different from your current settings, they will still be preserved.
Now you don’t need to worry about losing the formatting that is specific to certain files in your project.

That’s not all as this build has many other improvements and bug fixes – for example, improved Django 1.7 code insight. So we urge you to check the fixed issues and compare this build to the previous one!

Please give PyCharm 4 EAP a try before its official release and please report any bugs and feature request to our issue tracker.

Develop with Pleasure!
-PyCharm team

Posted in Cool Feature, Early Access Preview | 29 Comments

Feature Spotlight: Built-in local and remote SSH terminal in PyCharm

Happy Friday everyone!

Did you know that you can easily open a terminal to start a local or a remote session right inside PyCharm and perform all the usual tasks without ever needing to leave the IDE while developing?

To open the terminal, go to Tools | Open Terminal. As usual, you can assign a shortcut for this action for a quicker access. This will open the terminal inside PyCharm, so you can perform all the usual actions in it. For example, you can start some console application:


You can also open new terminal tabs, close and rename existing ones, and easily navigate between them.

To access any remote host, you can simply go to Tools | Start SSH session…

Note that the “start SSH session…” action is available only in PyCharm Professional Edition, while the terminal itself is available in both Professional and Community editions.

It will show you the list of already configured ssh connections. You can just choose the existing connection or create a new one:


When connected to a remote host, a new ssh tab appears in the terminal. For example, here I opened a file for editing with Vim on a remote host inside PyCharm:


To learn more about the SSH terminal and its advanced settings and additional features, please read this tutorial.

If you’re using Pycharm Community edition, you can access the remote host anyway – manually from the terminal, without the “start SSH session” action:


See you next week!

Posted in Cool Feature | 2 Comments

Feature Spotlight: Tracking code changes with Local History

Happy Friday!

Today I’d like to highlight the one of the top features that saves you from unexpected changes in your code and keeps things on track – Local History. This feature exists in PyCharm for a long while, but it’s worth to talk about it once again!

Note: Local History is available in both PyCharm Professional Edition and PyCharm Community Edition.

Local history is the way for PyCharm to track all your local personal changes to your project files. It simply expands the VCS functionality for you locally. When developing, there are constant small changes in the code. I bet you’ve had occasions when you needed the information about code changes, but the version control systems couldn’t help you because they track and compare differences only between committed versions – you just can’t commit so often to have a track of all your small changes. Some local changes between commits are unnoticed for VCS and this is where Local History comes to the rescue!

So let me show you how it works:

When editing, you can open local history by simply right-clicking on any file, and go to Local History | Show history:


This will show you the changes of your file, including commits, external changes, some major refactorings that happened, and just other basic changes. And then once you’re on one of these changes it shows you the diff of the file:


You can scroll down and revert any of the changes that you want by clicking the icons to insert the old code or remove code, or by simply reverting the entire file by right-clicking and selecting Revert or Create Patch:


You can also select a block of text and only show the changes for that selection. So select a code snippet and click Show history for selection:


You can also select an entire directory or your entire project – do “show history” on a directory or project and it’ll show you the list of files that have changed in your local history. And then once you find a file that you want you can double click on it to bring the diff for that file in that copy of the history:


You can also invoke local history from the keyboard by using Alt + Backquote and going down to Local history | Show history. That’s just a different way to invoke it.

Last but not least, at any time you can do Local history | Put label, give the label a name and now have a custom label which is stored in local history and lets you view your file’s state at the time you added the label:


As you can see Local History is just the PyCharm’s way of tracking your personal changes. That isn’t something that is shared across your project. It just tracks local changes to files, keeping everything in its history: external changes, commits, regular edits, etc.

I know quite a few times when it actually saved developers from a system crash consequences or helped when VCS just wasn’t enough. Sometimes you could really use that extra hand from your IDE.

So in case you’ve lost some files or made some unexpected changes in your code – everything is still in the PyCharm memory. Check it out!

See you next week!

Posted in Cool Feature | Leave a comment

Feature Spotlight: Behavior-Driven Development in PyCharm

Happy Friday!

Today I’d like to shed some light on another brand-new functionality upcoming for PyCharm 4 – Behavior-Driven Development (BDD) Support. You can already check it out in the PyCharm 4 Public Preview builds available on the EAP page.

Note: The BDD support is available only in the PyCharm Professional Edition, not in the Community Edition.

BDD is a very popular and really effective software development approach nowadays. I’m not going to cover the ideas and principles behind it in this blog post, however I would like to encourage everyone to try it, since it really drives your development in more stable and accountable way. Sure, BDD works mostly for companies that require some collaboration between non-programmers management and development teams. However the same approach can be used in smaller teams that want to benefit from the advanced test-driven development concept.

In the Python world there are two most popular tools for behavior-driven development – Behave and Lettuce. PyCharm 4 supports both of them, recognizing feature files and providing syntax highlighting, auto-completion, as well as navigation from specific feature statements to their definitions. On-the-fly error highlighting, automatic quick fixes and other helpful PyCharm features are also available and can be used in a unified fashion.

Let me show you how it works in 10 simple steps:

1. To start with BDD development and in order to get the full support from PyCharm, you first need to define a preferred tool for BDD (Behave or Lettuce) in your project settings:


2. You can create your own feature files within your project – just press Alt+Insert while in the project view window or in the editor and select “Gherkin feature file”. It will create a feature file where you can define your own features, scenarios, etc. PyCharm recognizes feature files format and provides syntax highlighting accordingly:


3. Since there is no step definitions at the moment, PyCharm highlights these steps in a feature file accordingly. Press Alt+Enter to get a quick fix on a step:


4. Follow the dialog and create your step definitions:


5. You can install behave or lettuce right from the editor. Just press Alt+Enter on unresolved reference to get the quick-fix suggestion to install the BDD tool:


6. Look how intelligently PyCharm keeps your code in a consistent state when working on step definitions. Use Alt+Enter to get a quick-fix action:


7. In feature files, with Ctrl+Click you can navigate from a Scenario description to the actual step definition:


Note: Step definitions may contain wildcards as shown in the step #6 – matched steps are highlighted with blue in feature files.

8. PyCharm also gives you a handy assistance on automatic run configurations for BDD projects. In the feature file, right-click and choose the “create” option, to create an automatic run configuration for behave/lettuce projects:


9. In the run configurations you can specify the scenarios to run, parameters to pass and many other options:


10. Now you’re all set to run your project with a newly created run configuration. Press Shift+F10 and inspect the results:


That was simple, wasn’t it?
Hope you’ll enjoy the BDD support in PyCharm and give this approach a try in your projects!

See you next week!

Posted in Cool Feature | 2 Comments

First PyCharm 4 Preview Build Now Available

It’s an exciting day for us at JetBrains PyCharm, as the first PyCharm 4 public
preview build 138.2401 is finally available for download! Head on over to the PyCharm Early Access Preview (EAP) page and have a look at the download section where you can get it for your platform right now.

As usual the PyCharm 4 preview build is available in two editions – free/open source PyCharm Community Edition and full-fledged PyCharm Professional Edition. While both of them are available for download and use at no charge, PyCharm Professional Edition has a 30-day evaluation period, which means PyCharm 3.4 Professional Edition EAP build 138.2401 comes with a 30-day time-limited license as well.

Note: The PyCharm 4 EAP build is not in the final product release stage and might contain severe bugs, so it’s supposed to be installed along with your current PyCharm installation for evaluation and checking out new features. No patch update for this EAP build will be available from within the IDE.

The PyCharm 4 preview build introduces a lot of new features, bug fixes and improvements, including a number of recently added PyCharm’s unique features as well as some features and improvements from Web and IntelliJ platform sides.

The most notable PyCharm’s unique features in this preview build are:

Behaviour-driven development (BDD) assistance

Behaviour-driven development has never been so easy and natural. With PyCharm 4 EAP we introduce the special BDD assistance giving you the full control of your textual requirements, graphical representation of the test results, and extensive and intelligent assistance on each step of the overall BDD process:


PyCharm 4 EAP now fully supports the two most popular Python tools for BDD: behave and lettuce.
PyCharm recognizes feature files, provides syntax highlighting, auto-completion, as well as navigation from specific feature statements to their definitions and back – all in a unified fashion.
Thanks to its high intelligence, PyCharm has a deep understanding of the definition steps: it shows errors and suggests automatic quick fixes, saving your time and increasing overall performance:


PyCharm and PyDev debuggers are merged

As you probably know, previously PyCharm has been using special fork of the PyDev debugger with some PyCharm specific changes and our own unique features like GEvent debugging and breakpoints at Django templates. We’re very proud that the PyCharm team is an active member of the Python community, with many team members deeply involved in different open-source projects development. So recently we decided to make one more contribution to open-sourced software and merged our debugger code with that from the original PyDev repository. Now the work on the debugger continues from both sides (PyCharm and PyDev) in a single place. The merged source code now lives here: Pull requests are greatly appreciated!

Referring objects view in PyCharm debugger

When debugging your project you can open the referring objects view for a desired object during runtime. To do so, in the debug mode right-click the object in the “Variables” window then click “Show Referring Objects”:


Jinja2 templates debugging

Now the PyCharm debugger works with Jinja2 templates. You can set breakpoints right in the editor, stop on them and perform other debugging actions the same way as in the already supported Django templates debugging mode:


To learn more about the new BDD or debugger functionality, stay tuned for further blog posts, announcements, and tutorials.

Improved Python/Django console tool window

PyCharm automatically detects which type of the console should be run depending on your project type and context. The console can be launched via the tools window menu as shown on the picture below or using the “Ctrl+ E” shortcut:


Still, there is one more cool Python console feature that was included in this build:

showconsoleNow you can leave the console opened after a project run or a debug session, saving its context. In order to enable this functionality, you just need to mark the “Show command line afterwards” option in the project run/debug configurations:


Method Call hierarchy

Thanks to the PyCharm’s fantastic static code analysis capabilities, PyCharm intelligently analyses the code and builds a call hierarchy trees for method calls in different scopes:


New project creation wizard

The project creation wizard has changed a bit and now it has 2 steps:
On the first step you have to choose the project type. On the second step PyCharm shows you only relevant settings for the selected project type:


Unittest sub-tests support

Python 3.4 support is even more polished with the PyCharm`s test runner now recognizing the subTest() context manager for unittest.

As usual, PyCharm 4 will have all features of the upcoming WebStorm 9 release. WebStorm 9 preview builds are already available (read more in WebStorm blog), so here is just a short summary of what’s new available in the PyCharm 4 preview build 138.2401 from the Web side:

- Updated Live Edit feature that can now automatically update your Node.js app on any changes
- Spy-js for Node.js applications
- PhoneGap/Cordova integration
- Postfix templates for JavaScript
- Improved Editorconfig plugin
- Gulp integration
- Improved Polymer support
- Support for the latest Sass 3.4

These new features are available for installation from JetBrains plugin repository.

Apart from additional features and improvements from the Web side, PyCharm 4 gets a lot of improvements from the underlying IntelliJ Platform. The most noteworthy changes are:

  • Redesigned Settings(Preferences in OS X) dialog: settings dialog gets a cleaner interface, a more straightforward layout and a rearranged settings tree (some of the settings have been merged, and others reordered based on their frequency of use):


  • The Open action from the Welcome screen now opens single files. That means you can now edit files regardless of the projects and their configurations.

Other improvements from the IntelliJ Platform include:
- Backspace smart indent makes the Backspace key aware of your code formatting settings, so it doesn’t break your code when removing indents before caret.
- The new Code cleanup action (available via Analyze → Code Cleanup or as an option in the VCS commit dialog) applies quick-fixes in batch mode to selected files.
- The improved Find in path action
- Copy/paste selected code as HTML/RTF is now available without additional plugins.
- Better IDE startup time.
- Mercurial support improvements
- Reset Current Branch to Here action now available from the Git Log

Download PyCharm 4 preview build 138.2401 for your platform right from the project EAP page and please report any bugs and feature request to our Issue Tracker.

Develop with pleasure!
-PyCharm team

Posted in Cool Feature, Early Access Preview | 31 Comments

Feature Spotlight: Deployment with PyCharm

Happy Friday, everyone!

I’d like to highlight a very handy feature of PyCharm called Deployment support in our spotlight this week:


When developing some Python or Web applications, chances are at one point we will be deploying them. During development we may want to deploy our application to a testing/staging server, to a VM or a Vagrant box. And once release day is there we want to make sure our carefully crafted code makes it to production.

PyCharm shines here again, as it supports code deployment to remote hosts. Read the Deployment in PyCharm tutorial to learn how to easily set up mappings, browse files on a remote machine, upload and synchronize your code, compare local and remote versions of your files and configure automatic synchronization.

See you next week!

Posted in Cool Feature | 2 Comments

Feature Spotlight: Multiple Selections in PyCharm

Today I’d like to highlight one of the most top voted features that appeared in PyCharm 3.4 some time ago – Multiple Selections. Since then a lot of people have been using it and enjoying the increased productivity while editing.

With this feature you can:

  • Set multiple cursors in the editor area: Alt + Mouse Click (Option + Mouse Click for Mac OS X). Note that on some systems you also have to use Shift with the shortcuts mentioned.
  • Select/unselect the next occurrence: Alt + J / Shift + Alt + J (Ctrl + G / Shift + Ctrl +G for Mac OS X)
  • Select all occurrences: Shift + Ctrl + Alt + J (Ctrl + Cmd + G for Mac OS X)
  • Clone caret above/below (the shortcuts are not mapped yet)
  • Remove all selections: Esc

You can redefine these shortcuts in Settings -> Keymap -> Editor Actions if necessary.

Multiple selections work nicely together with other PyCharm features like Code completion, Select word at caret, Join lines, Copy/paste, and the others. This feature also works with all languages supported by PyCharm such as Python, HTML, JavaScript, CSS and more.

Here’s a short demo on how Multiple Cursors work in PyCharm:

Hope you’ll enjoy this handy feature!


Posted in Cool Feature | 6 Comments

Meet the PyCharm Team in Berlin, Germany at EuroPython 2014

europythonJuly 21 – 27, the JetBrains PyCharm Team will be in Berlin, Germany for EuroPython 2014. The conference will be held in the Berlin Congress Center which is found in the immediate vicinity of the Fernsehturm at Alexanderplatz, right in the centre of Berlin.

The EuroPython conference is the second largest global conference for the popular programming language Python, after the PyCon US conference in North America. It is aimed at everyone in the Python community, of all skill levels, both professional programmers and those who just started learning this fantastic language. There will be more than 120 talks in five different tracks, including one by JetBrains:

Python Debugger Uncovered – Thursday, July 24 at 11:45
by Dmitry Trofimov

This talk will explain how to implement a debugger for Python. We’ll start with setting a simple trace function, then look how it is implemented in modern IDEs like PyCharm and Pydev. Then we go further in the details and uncover the tricks used to implement some cool features like exception handling and multiprocess debugging.

The show represents a great opportunity to meet three members of the PyCharm Team, learn about the latest release, our current developments or just say hi. We invite you to stop by with your questions and chat about your experiences with PyCharm and other JetBrains products. We will be raffling some PyCharm licenses so be sure to register and grab some of our cool giveaways.


We look forward to meeting you there! For more information on the EuroPython 2014 conference, please visit the official website.

Develop with pleasure!
PyCharm team

Posted in Conferences & Events | Leave a comment

Write Clean, Professional, Maintainable, Quality Code in Python

Bad code can work. But if it’s buggy, messy and difficult to maintain, it can eventually break a project, a development team or even an entire company. The necessity to write clean, professional and maintainable code is obvious and is getting more important nowadays as projects grow, more people become involved in development, and more projects go open source.

In today’s world projects are huge, with dozens and hundreds of people working on the same code base. Early detection of possible problems in code plays a huge role in helping developers write clean, professional, high-quality code that will be understood by others. Luckily, there are a number of tools that allow Python developers to analyse their code against errors and possible perils. These include pyflakes, pylint, pep8, and others. The problem, however, is that many developers use them after the code is already written, just to check what can be improved. A much more sound approach is, as with Continuous Integration, to find problems early and write clean code from the very beginning. This is where IDEs come in with their code intelligence.

What distinguishes a good IDE from good text editors? By definition, an IDE tightly integrates a range of development tools tuned to work with each other seamlessly. Unlike text editors, even superior ones like Vim or Sublime Text, a good IDE intimately understands your code and its flows. While some IDE functionality can be enjoyed in a text editor by installing third-party plugins, these plugins are not guaranteed to work smoothly as they don’t interact with each other. They do their highly-tailored job, but without communicating with other subsystems. An IDE with its core collects data from different subsystems, effectively transfers this data to other subsystems and reuses it whenever is possible. Consequently, it provides code intelligence with refactoring abilities, code navigation, automatic code fixes, testing assistance, smart code autocompletion and ultimately suggestions to keep your code maintainable and of a good quality.

PyCharm is one of the most intelligent Python development products on the market today. It has a lot of specially selected tools, tuned and tested to work with each other: an advanced editor derived from IntelliJ Platform, a debugger with the ability to collect runtime type statistics, many unique code inspections which work on the fly, and lots more. Any PyCharm user can benefit from using it for their development.

The ultimate goal of any development tool is not only to speed up your development, but more importantly, to keep your code under control, in a consistent state. This is applicable to any project, but is most valuable when you have a team or simply some large project that must stay maintainable. Or when you have coding standards to adhere to. Or when you just want to get unified and standardized code as output that you want to share with others.

A key benefit you get from PyCharm is being able to write clean, professional and maintainable code from the early development stages. It proactively monitors your code state as you type, checking it against numerous inspections for code style violations rules and sophisticated traps that are not obvious but potentially can break your application. As a result, you can prevent possible problems, rather than having to troubleshoot them later. You start to form a development practice where you get instant feedback right as you’re coding. This saves time on bug-fixing and, in the end, allows your team to develop cohesive software more rapidly.


Let me highlight some of the features in PyCharm that can help you consistently hold your code to a high quality standard.

Code Style violations

The very first feature I need to describe is basic code style checking. Python is very sensitive to code formatting by its nature. The very basic requirement to keep your code in a consistent state is to preserve the same formatting style across all over your project. PyCharm has a special subsystem that controls code style and inspects different code style violations. It watches for code formatting rules like tabs and indents, spaces, wrapping and braces, blank lines etc. If there are any code style violations, PyCharm will highlight them in the code:


PyCharm has special automatic quick-fixes for errors that it finds, so in this case you can quickly apply the “Reformat file” fix and PyCharm will make the file conforming to project code style settings:


These code style settings are highly customizable, and you can set your own code style scheme for each desired language, per project:


You can also save your settings and apply them to other projects or share with your peers.

Simple formatting is not enough! Here come customizable inspections

PyCharm has a huge number of code inspections for various projects, languages and frameworks. Those inspections checks your code against different errors. PyCharm finds different types of errors such as unresolved references, unused variables and imports, deprecated functions, classes and modules, PEP8, package requirements, and many many others. You can review the list of available inspections in Settings | Inspections. The checklist is comparable to pylint functionality, and you’ll notice it’s very comprehensive. Pylint is still the definitive tool for Python code analysis, but PyCharm’s advantage is that it checks your code on the fly. PyCharm has many settings to control those inspections: enable and disable, set the severity of inspections, edit the behavior of alerts, etc.:


You can also create and share customized inspections profiles. That is very helpful when you want to apply the same set of checks against different projects, or if you want your entire team to develop in the same style.

Manageable code inspections scopes

PyCharm provides flexibility for managing code quality with inspections scopes. Inspection scopes settings let you set and manage different rules for individual project parts:


Code analysis reports

With PyCharm, you can check your code against different inspection profiles, both standard and customized, and get a detailed report for further investigations. Lots of actions can be performed with code analysis reports as well:


You can export the results to HTML or XML for further investigation. In that way PyCharm works similar to pylint.

PEP 8 integration

Among a number of different inspections, PyCharm supports the PEP 8 standard by integration of the official tool. This tool is being run in the background and you get an instant results with the highlights of PEP 8 violations in the code editor. Like with other inspections, you can change the severity of PEP 8, edit highlighting and other settings.


Python code compatibility checks

Living in a world with two contending versions of Python 2 and 3, it’s very important to check your code for compatibility against different versions of Python. PyCharm has a special inspection that helps you do that:



OK, so PyCharm finds errors and warnings. What else? PyCharm doesn’t just alert you to potential problems, but helps you with suggestions to fix them in-place. When a problem is found at the line your caret is on, you’ll notice a red or yellow bulb next to it. Choose from the list of ways to fix the problem and apply the suggested fix in one click / keypress.


As you can see, PyCharm has a powerful and highly customizable toolset for code quality assurance. It checks your code on the fly and helps you eliminate problems early.

This article only scratched the surface of what PyCharm can really do. There are a lot more features in PyCharm that assist you with code quality for your projects. For more details on features mentioned in this article and to learn additional handy features like code auto-generation, type hinting and more, please consult the tutorial Code Quality Assistance Tips and Tricks, or How to make your code look pretty? available in our tutorial space among other useful tutorials about PyCharm.

All the described functionality is available in PyCharm Community Edition, which is free and open source! Feel free to use it to improve your code quality and speed up the development process for your professionally developed projects!

Develop with Pleasure!

Posted in Cool Feature, Tutorial | 23 Comments