Just one week after the PyCharm 4 release, we are eager to announce that the PyCharm 4.0.1 bug-fix update has been uploaded and is now available from the download page. It also will be available shortly as a patch update from within the IDE (from PyCharm 4.0 and 4.0.1 RC only).
As a recap, some notable highlights of this release include: a fix for a rare but severe bug that causes an infinite indexing, a fix for a settings import bug, code completion and inspections fixes, a fix for matplotlib support, a fix for remote interpreters support and some Django support fixes.
For further details on the bug fixes and changes, please consult the Release Notes.
As usual, please report any problem you found in the issue tracker.
If you would like to discuss your experiences with PyCharm, we look forward to your feedback on our public PyCharm forum and twitter.
The full list of fixes and improvements for this build can be found in the release notes. The most notable among them are: a fix for a rare but severe bug resulting in infinite indexing, code completion and inspections fixes, a fix for remote interpreters support and some Django support fixes.
The build is available for download, and you can also use the patch-based upgrade to upgrade from within the IDE (from PyCharm 4.0 only) without a full re-installation. Just make sure you’ve selected the Beta Releases channel in update settings.
If no problems will occur with this build in the coming days, we’ll release PyCharm 4.0.1 this week. Anyway, if you encounter problems, please file them to our public tracker.
We’re happy to announce the general availability of PyCharm 4, the new major release of our intelligent IDE for Python, Django, and Web development that brings more of everything you love about Python!
As before, PyCharm 4 is available as a full-fledged Professional Edition for Python and Web development or a free and open-source Community Edition for pure Python development.
With v4 we’ve added more new features, more enhancements in existing functionality, more ways to enjoy coding… in short, more value.
This release is more scientifically focused with the introduction of IPython Notebook integration and the NumPy array viewer along with NumPy code insight and support for matplotlib in the integrated python console.
Now PyCharm 4 boosts your productivity even further, thanks to special assistance for BDD (Behavior-Driven Development). Take full control over your textual requirements and graphical representation of test results, and enjoy extensive and intelligent assistance at each step of the overall BDD process. behave and lettuce, two of the most popular Python tools for BDD, are supported.
The PyCharm debugger has grown more powerful as well. We’ve merged our debugger code with that from the original PyDev repository, which means a lot of improvements in the united debugger. We’ve also added a brand-new attach to process feature, so you can now connect a debugger with any running Python process and debug in the attached mode. When debugging your project you can now open the referring objects view for any object during runtime. And if that’s not enough, the PyCharm debugger now works with Jinja2 templates.
More goodies in this release include:
Improved Python/Django console tool window
Now you can leave the console open after a project run or a debug session
View of call hierarchy trees for method calls in different scopes
Better package management
Unittest subtests support
New project creation wizard
A host of improvements inherited from WebStorm 9 and the ever-growing IntelliJ Platform
And even more
Please see the what’s new page for more details or, for a quick visual overview, watch this short What’s New in PyCharm 4 video:
And in case you missed it, PyCharm has recently become much more education-friendly! Recently we launched PyCharm Educational Edition, a free & open source edition of PyCharm IDE for students that learn programming and their teachers. Get your free PyCharm Educational Edition today.
PyCharm 4 Professional Edition is a free update for everyone who purchased their license after November 19, 2013. As usual, a 30-day trial is available if you want to try PyCharm as your new Python/Django IDE.
PyCharm 4 Release Candidate mostly includes a consolidation of fixes for bugs comparing to previous EAP builds. For the detailed list of notable changes and improvements, please check the Release Notes.
In case you missed what’s new coming in PyCharm 4 – please read the blog posts covering new features in the first, second, and third EAP builds.
We hope that there will be no major bugs, however, should you encounter any problems, please report them to YouTrack – there’s still a bit of time to fix stuff before the final release.
Stay tuned for a PyCharm 4 release announcement, follow us on twitter and develop with pleasure!
Today we’re glad to let you know that the third PyCharm 4 EAP build 139.354 is ready for your evaluation. Please download it from our EAP page.
Just as always, this EAP build can be used for 30 days after its release date and it doesn’t require any license.
Comparing to the previous EAP builds, this one mostly includes a consolidation of fixes for various bugs and problems, and improvements for recently added features. For the detailed list of notable changes and improvements, please check the Release Notes.
The most notable brand-new feature in this build is the NumPy array viewer which is available from the debugger and the integrated Python console:
To view a NumPy array, run your project in a debug mode and find the NumPy array in the variables list shown in the PyCharm`s graphical debugger. Right-click it and select “View as Array”.
To follow the scientific mood of this PyCharm 4 EAP build, we also added the support for matplotlib in the integrated python console.
This build also brings a lot of improvements to the recently announced IPython Notebook integration:
PyCharm now works better with cells of different types. We’ve fixed issues with cell rendering and some bugs related to wrong PyCharm behavior inside ipynb cells. Now PyCharm starts the IPython notebook automatically when running a ipynb file or separate cells in it.
When working with IPython notebook files, PyCharm now provides well-known shortcuts: for example you can press Shift+Enter to run a cell or Ctrl+Shift+Down to move a cell down. See the list of IPython notebook shortcuts here and try them in PyCharm.
The full list of IPython notebook improvements can be found in our issue tracker.
The new “Attach to process” feature introduced with the previous build is now available under the Mac OS platform!
Please take PyCharm 4 EAP build 139.354 for a spin! We hope that there will be no major issues, however, should you encounter any problems, please report them to our public tracker. No patch update for this EAP build will be available from within the IDE. Please download the full installation source for your platform and install it along the previous installations of PyCharm.
Stay tuned for PyCharm 4 release announcements, follow us on twitter, and develop with pleasure!
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:
“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!” https://www.python.org/doc/essays/cp4e/
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
PyCharm 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.
PyCharm 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!
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:
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:
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.
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:
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!
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!