Webinar Recording: 10 Tips for Pythonic Code

The recording of our July 6th webinar, 10 Tips for Pythonic Code with Michael Kennedy, is now available on the JetBrains YouTube Channel. Michael’s code used in the recording along with the script for each step in the webinar can be found on GitHub and the webinar slides on SlideShare.

Michael did a fantastic job, making this one of the highest-rated JetBrains webinars to date. He’s obviously very good at speaking and teaching, and prepared heavily for this webinar with well-commented sample code.

About “10 Tips on Pythonic Code” with Michael Kennedy

If you’re a Python developer interested in the next step towards Pythonic code, with PyCharm as a productivity boost, then our next webinar is a must-attend. Michael Kennedy, well-known Python podcaster, speaker, writer, and trainer, is our guest for a PyCharm webinar on “10 Tips for Pythonic Code”.

If you like this presentation and want to dig deeper into Pythonic code, check out Michael’s full course Write Pythonic Code Like a Seasoned Developer which covers over 50 Pythonic topics.

Video Contents

  1. (1:03) What is Pythonic?
  2. (2:43) Dictionaries for performance
  3. (11:01) Memory efficiency with __slots__
  4. (20:50) Merge dicts
  5. (29:05) Yield and generator methods
  6. (37:45) Lambda expressions
  7. (42:04) Adding iteration to custom types
  8. (47:26) Comprehensions and expressions
  9. (58:01) JSON back and forth (files and web services)
  10. (1:01:30) Slicing (collections and databases)
  11. (1:05:56) yield + recursion

Keep up with the latest PyCharm news on our blog and follow us on Twitter @PyCharm.

The Drive to Develop
– PyCharm team

Posted in Webinar | 3 Comments

PyCharm 2016.2 EAP 5 (build 162.1121)

Today we announced the PyCharm 2016.2 EAP 5 build 162.1121.

Please download and try it today!

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 build, this one mostly includes a consolidation of fixes for various bugs and problems, as well as improvements for recently added features. For the detailed list of notable changes and improvements, please check the Release Notes.

We encourage you to give PyCharm 2016.2 EAP 162.1121 a try before its official release. Please change the updates channel to “Early Access Program” in the updates settings (Help|Check for updates…) to get the patch update from the last PyCharm 2016.2 EAP build 162.1121 or download the full installer for your platform. Please report any bugs and feature request to our issue tracker.

-PyCharm team

Posted in Early Access Preview | 3 Comments

PyCharm and Django Announce 30% Discount With All Proceeds Going to DSF

After years of premier support for the Django Framework, JetBrains PyCharm gives a big boost to the Django Software Foundation’s (DSF) fundraising. During a two-week campaign, buy PyCharm Professional Edition with a 30% discount code and all money raised will go to the DSF’s general fundraising and Django Fellowship program. Additionally, JetBrains is sponsoring PEP 484 type hinting in Django through a separate DSF Fellowship grant.

frank-wiles“Django has grown to be a world-class web framework, and coupled with PyCharm’s Django support, we can give tremendous developer productivity,” says Frank Wiles, DSF President. “The DSF helps make this growth happen, and we are delighted to have JetBrains support in our fundraising.”

PyCharm is the leading Python IDE for professional developers, with a long history of first-class support for Django. The two products share common ideals of developer productivity and clean, pragmatic design, and PyCharm’s Django support has evolved through the years as Django expanded and improved.

dmitry-filipov“For six years, Django has been the stable rock in our feature set,” says Dmitry Filippov, JetBrains Product Marketing Manager. “The success of Django is invaluable for us as well as for the whole Python community. This promotion gives us an opportunity to strengthen PyCharm’s relationship with Django by helping the DSF reach its fully-funded campaign goal.”

About the Promotion

During this two-week promotion, you can effectively contribute* to Django by purchasing an Individual PyCharm Professional annual subscription at a 30% discount. It’s very simple:

  1. Click this link to go to the PyCharm annual subscription page.
  2. On the check-out page, сlick “Have a discount code?”.
  3. Enter this 30% discount promo code:
  4. Fill in other required fields on the page and click the “Place order” button.

Read more details on the special promotion page.

Again, all proceeds from this promotion will go to the DSF fundraising campaign—not just the profit, but actually the entire sales amount. This campaign will help the DSF continue contributing to different outreach and diversity programs such as Django Girls workshops, the Django Fellowship program, sponsoring official Django conferences, and many others.

*Please note this purchase is not a tax-deductible donation. The promo code is only applicable for buying new Individual PyCharm Professional Edition annual subscriptions. The offer doesn’t apply to other products or types of subscriptions.

Type Hinting (PEP 484) in Django under the Django Fellowship Program

Additionally, the DSF and JetBrains announce a grant for the Django core development activity under the Django Fellowship program in order to bring the new Python Type Hints standard (PEP 484) into future versions of Django.

frank-wiles“Python 3 support has been a strong focus for Django in recent years,” says Wiles. “Python 3.5 and type hinting are a huge step towards developer productivity, especially combined with powerful tools like PyCharm. This JetBrains grant helps our Django Fellows and community bring type hinting to Django.”

The standard is already quite stable, with only a few amendments over the last year. With this work, which starts soon, the DSF will be funding Django core developers and other community members to help with the development.

dmitry-filipov“We believe in Python 3 and the benefits of type hinting, particularly for frameworks like Django,” says Filippov. “Type hints in Django can let PyCharm boost Django developer productivity with better code inspections, code completion, and refactorings. We’re going to pioneer PEP 484 use in Django, making tremendous headway into the future of Django and Python.”

There’s no exact timeline for the project yet, but keep an eye on the django-developers mailing list and the Django blog for updates as work progresses.

If you have any questions, get in touch with Django at fundraising@djangoproject.com or JetBrains at sales@jetbrains.com.

Posted in Cool Feature, Sales and Promotions | Leave a comment

PyCharm 2016.2 EAP 4 (build 162.1120)

Today we continue the weekly delivery of PyCharm 2016.2 preview builds with the PyCharm 2016.2 EAP build 162.1120.

Download and try it today!

Some highlights of the PyCharm 2016.2 EAP build 162.1120 are:

  • A fix for keyboard input in the debug mode
  • A fix for Docker Compose default mapping bug
  • A fix for BDD support using remote interpreters
  • A number of fixes for Django support
  • Various performance improvements
  • Fixes for Python Profiler integration, docstrings support and much more

The list of numerous bug fixes and improvements for this build can be found in the Release Notes.

We encourage you to give PyCharm 2016.2 EAP 162.1120 a try before its official release. Please change the updates channel to “Early Access Program” in the updates settings (Help|Check for updates…) to get the patch update from the last PyCharm 2016.2 EAP build 162.1024 or download the full installer for your platform. Please report any bugs and feature request to our issue tracker.

-PyCharm team

Posted in Early Access Preview | 5 Comments

PyCharm Edu 3 coming soon

Today we’re announcing that PyCharm Edu 3 is coming this August, right before the new school year. Since the previous release we’ve tremendously improved PyCharm Edu for teachers and course authors, implemented new useful functionality, made a lot of small neat improvements, and fixed various problems.


The best things about PyCharm Edu will stay unchanged – it’s still going to be completely free and open source software, specifically designed to help beginners with little or no previous coding experience to learn programming quickly and efficiently, while using a modern professional tool.

The installation files for PyCharm Edu 3 Preview can be found here:
PyCharm Edu 3 Preview page
Please see the bottom of the page to find a build for your platform.
Installation instructions for Windows, Linux, and Mac OS X platforms are available here.

What’s New in the upcoming PyCharm Edu 3?

Enhanced task description panel

In previous PyCharm Edu versions, as a course author you had to write task descriptions in separate HTML files without being able to preview a task. In PyCharm Edu 3, we’ve reworked this so now you can edit your task descriptions right in the task panel, by clicking the special “Edit” icon:


Comparing to previous versions, PyCharm Edu 3 now supports larger task descriptions. You can also put code snippets right inside the task description as shown on the screenshot. The code will be perfectly highlighted like on the following screenshot:


In addition to this improvement, you can now choose to write your tasks in Markdown instead of HTML.

The Adaptive Python course

Thanks to integration with Stepic, a learning management platform, in PyCharm Edu 3 we’ve added a brand-new Adaptive Python course which is available by default:


Long story short, going through this course, PyCharm Edu and Stepic monitor the student’s progress and pick the next tasks based on how easy or hard the previous one was:


As shown on the screenshot above, the student can give hints to the system if the task feels too easy or hard for him or her. Read more about the Adaptive Python course on the Stepic course webpage.

Preview a course from the Сourse Сreation Mode

When creating a course, it’s good to view the course from the student’s perspective and test it while you’re designing. PyCharm Edu 3 makes this task easy with a new action: when designing a course, right-click on the course view and go to Course Creator | Create New Educational Project:


Running and debugging custom tests

The custom tests that you write to verify students’ input and solutions can be now run and debugged right from the course creation mode, without having to generate the course or preview it. Right-click the Run button from the test editor and choose the desired action:


You can place breakpoints in your test code right inside the editor and see a nice console output along with the variable viewer:


Automatic course dependencies

When designing your course, you’ll most likely use some packages and libraries that are not installed on a student’s machine. Now you can list all the dependencies in the requirements.txt file when creating your course. When a student opens the course on their computer, PyCharm Edu will create a separate virtual environment based on the default Python interpreter and install all the dependencies required.

A fix for raw input in debug mode

Not actually a new feature, but a fix for a bug for the widely used case in teaching and learning programming. You can now safely use the input() function in the debug mode, so when you step over the input() function, you get the command line to proceed with the actual keyboard input.

Enhanced course view in course creation mode

Additionally to the mentioned new features and improvements, we’ve reworked the course view in the course creation mode. The course view now represents a course the same way a student would see it. All system, test and hidden files are displayed in light gray:


Read more about PyCharm Edu on its website and learn how it works for students and instructors.

Try PyCharm Edu 3.0 Preview and share your thoughts with us. As always, your feedback is very welcome. Please follow us on twitter, report bugs to our public issue tracker, or simply write a comment to this blog post if you have any additional questions. Please feel free to criticise and do let us know about any difficulties you run into or any bugs you notice.

We encourage you to sign up for PyCharm Educational Edition 3.0 Preview to get the updates on the next preview builds and the release itself, so you can use it in the upcoming school year.

Learn and educate with pleasure!
Your PyCharm Edu Team

Posted in Early Access Preview | 6 Comments

Webinar: “10 Tips on Pythonic Code” with Michael Kennedy, July 6

If you’re a Python developer interested in the next step towards Pythonic code, with PyCharm as a productivity boost, then our next webinar is a must-attend. Michael Kennedy, well-known Python podcaster, speaker, writer, and trainer, is our guest for a PyCharm webinar on “10 Tips for Pythonic Code”.

  • 16:00 CEST / 10:00 AM EDT
  • Registration 


One of the special concepts in Python is the idea of writing idiomatic code that is most aligned with the language features and ideals. In Python, we call this idiomatic code Pythonic. While this idea is easy to understand, it turns out to be fairly hard to make concrete.

In this webinar, Michael Kennedy from the Talk Python To Me podcast will take you on a tour of 10 of the more popular and useful code examples demonstrating examples of Pythonic code. In the examples, you’ll first see non-Pythonic code and then the more natural Pythonic version.

Topics covered include the expansive use of dictionaries, hacking Python’s memory usage via slots, using generators, comprehensions, and generator expressions, creating subsets of collections via slices (all the way to the database) and more. Several of these are Python 3 features so you’ll have even more reason to adopt Python 3 for your next project.

Speaking to you

Michael Kennedy is an author, instructor, and speaker. He is the host of the Talk Python To Me podcast and founder of Talk Python Training, an online training company for Python developers. Michael has taught over 100 week-long training courses to professional software development teams throughout the world and is an expert in Python, MongoDB, and .NET among other technologies.


Posted in Webinar | 1 Comment

PyCharm 2016.2 EAP 3 (build 162.1024)

A week ago we announced the second PyCharm 2016.2 EAP build with lots of new neat features and improvements such as:

  • vmprof Profiler support
  • An Optimize Imports configuration
  • The Thread suspend option on a breakpoint
  • Pandas Dataframes Viewer
  • and more

Today we continue the weekly delivery of PyCharm 2016.2 preview builds with the PyCharm 2016.2 EAP 3 build 162.1024. Download and try it today!

Compared to the previous EAP build, this one includes a consolidation of fixes for various bugs. The only new small change in this build is package installation from requirements.txt with extras. Now PyCharm understands the syntax of extra options in requirements.txt files, automatically installing all the specified extras. As an example, now you can use following code in your reqirements.txt files:

The full list of changes comparing to the previous EAP build is available in the Release notes.

Please take PyCharm 2016.2 EAP build 162.1024 for a spin! Should you encounter any problems, please report them to our public tracker.

You can download the build or use the patch-based upgrade to upgrade from within the IDE (from the previous PyCharm 2016.2 EAP build only) without a full re-installation. Just make sure you’ve selected the EAP channel in update settings.

PyCharm Team
The Drive to Develop

Posted in Early Access Preview | 1 Comment

PyCharm 2016.2 EAP 2 (build 162.917)

Two weeks have passed since the first EAP build of the PyCharm 2016.2. The PyCharm team has returned from PyCon 2016 in Portland, and today we are happy to present you the new PyCharm EAP build, with many new features and bug-fixes inside.

Here are some highlights.

vmprof Profiler Support 

For those who care about performance, the PyCharm Professional Edition provides profiling support. It allows running Python code with the cProfile or Yappi profiler enabled, viewing the profiling results in the execution statistics report, and seeing a graph visual representation.

While being very useful in many cases, cProfile and Yappi have their limitations. First, they are tracing profilers, which means that while measuring the duration of function calls, they add an overhead to every call making the final result sometimes inaccurate. Second, they collect the execution statistics for functions, not distinct calls of this functions. Thus, while it is possible to present results in a graph form, there is not enough data to view the call tree, which can be sometimes very informative and helpful.

This all made us support another Python profiler: vmprof.

vmprof is a sampling (statistical) Python profiler written in C (so it has minimal overhead), developed by members of the PyPy team. It works for Python versions 2.7 through 3.5, CPython as well as PyPy, and supports Linux, Mac OS X and Windows.

To launch the vmprof profiler from PyCharm, all you need is to have it installed on your selected Python interpreter and then profile your run configuration.

Screen Shot 2016-06-16 at 15.46.48

After that, you will see the normal profiling report but with an additional “Call Tree” tab.

Screen Shot 2016-06-16 at 14.16.22

The only limitation is, being a statistical profiler, vmprof-python needs some time to gather enough samples, so it may not work for very short (less than 10ms) scripts.

Configuration for Optimize Imports 

The new dedicated setting for “Optimize Imports” actions allows you to configure how imports are sorted and arranged in groups.

Screen Shot 2016-06-16 at 15.40.25

Thread Suspend Option

Previously with the PyCharm debugger, on reaching a breakpoint during execution, only the corresponding thread was suspended and others were still running. Now there is a suspend option with two values: All and Thread. ‘All’ makes all threads to stop at once whenever any breakpoint hit. With the ‘Thread’ option, only the corresponding thread stops.

Screen Shot 2016-06-16 at 15.22.47

Pandas Dataframes Viewer 

PyCharm has had a special array viewer for NumPy arrays since version 4.0, but it didn’t support pandas dataframes, which recently has started to be a highly voted feature. The new EAP enables the array viewer for pandas dataframes as well. Thanks to our user Yuli Fiterman, who contributed this feature!

Screen Shot 2016-06-16 at 14.48.42

Git/Mercurial Log viewer

The viewer now loads in the background on every change (a commit, fetch, rebase, etc). As a result, it’s always ready when you open it.

While the loading is in progress, there’s a thin stripe shown under the toolbar.idea_2016_2_log_progress

Custom Background Image for Every Project

While it may seem as something that doesn’t matter for productivity at all, a feature is still nice to have. Sometimes appearance is everything.

With the ‘Set Background Image’ (use Find action Shift-Cmd-A) action, you are able to set any image file as a background for PyCharm.

Screen Shot 2016-06-16 at 16.36.47

And now you can set different backgrounds for different projects!

That’s all for today, stay tuned!

Download PyCharm 2016.2 EAP build 162.917 for your platform from the project EAP page or update right from the previous PyCharm EAP installation with a patch update within the IDE. Please report any bugs and feature requests to our Issue Tracker, your feedback is very important for us to make PyCharm 2016.2 better.

Posted in Early Access Preview | 6 Comments

PyCharm 2016.2 EAP is Open

Today we’re excited to announce that the first PyCharm 2016.2 Early Access Preview (EAP) build 162.646 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.


What is the Early Access Program (EAP)?
We at JetBrains believe that making tools for developers should greatly involve listening to developers. Early Access Programs allow you to try pre-release versions of our software to evaluate features that will be added to the next release, closely participate in discussions about PyCharm, and influence the release from early stages onwards.

Once you’ve downloaded the latest EAP build (from its official page), you’ll start getting updates with new features and improvements every week (to receive notifications about updates, make sure to set “Early Access Program” in your update settings). Your feedback is welcome and very much appreciated in our issue tracker or in the comments section of this blog post.

PyCharm 2016.2 EAP introduces a few new features, bug-fixes and improvements that are unique to PyCharm, as well as a lot of features and improvements from the Web and IntelliJ Platform sides. Here are some of the highlights:

  • Python Related Improvements
    • Function return values are now shown in the PyCharm’s debugger after stepping out from a function
    • Postfix code completion has been improved with the “main” and “print” postfix templates extracting your [expression].main and [expression].print code snippets respecting Python 2 and Python 3 versions
    • A number of fixes related to parsing requirements.txt files
  • General
    • The Inspection tool window has been redesigned for better ergonomics: now code location for each of the problems is displayed along with controls to either apply a quick-fix or suppress inspection
    • More friendly popup IDE notifications in the rightmost bottom corner which are now more compact, and grouped by the subsystem they came from
    • The brand new Set Background Image option that makes your IDE look different by choosing a background image for the editor and the IDE frame
    • The installer for Windows now comes with our custom JDK build where we address some issues with focus and font rendering
  •  Editor
    • Better spell-checking suggestions based on Damerau–Levenshtein distance
    • Support for font ligatures (highly voted request)
    • Coding assistance for Regex has been extended with better error reporting and added code completion for named group references
    • Language injection now works in YML files
  •  Version control integration
    • The Commit dialog now shows unversioned files (so you don’t forget to commit something important)
    • Patches can now be applied from the clipboard (the IDE will offer to apply the patch when it obtains focus), or by dragging a file into the IDE
    • If a file has been moved or renamed since a patch was created for it, the IDE will try to figure that out or let you manually choose the file to apply the patch to
    • The VCS log continues getting better with a handy loading progress indicator, a shortcut to navigate to the filter field, and tooltips for graph arrows
    • The Git Log can now display commit details for several selected commits (this works for Git and Mercurial)
    • Brand new Apply Patch dialog to apply the changes from patch using a Merge-like dialog
  •  Web development improvements
    • Small but neat improvements for TypeScript support
    • You can now configure whether you want IDE to add single, double or no quotes at all when autocompleting attributes in HTML and JSX
    • You can now drag a JavaScript or CSS file into the opened HTML file, and PyCharm will automatically create a script or a link tag inside the head tag for you.
    • Thanks to the integration with Angular CLI, you can now create new Angular 2 projects with ease. Install angular-cli globally via npm and create a new project in PyCharm.
    • Grunt, gulp or npm tasks as a Before launch task in a Run/Debug configuration

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

-PyCharm Team
The Drive to Develop

Posted in Early Access Preview | 8 Comments

Meet the PyCharm Team at PyCon 2016

May 28th – June 5th, the JetBrains PyCharm Team will be in Portland, Oregon for PyCon 2016. As usual, we sponsor the event and will have a JetBrains PyCharm booth in the Expo Hall during the main conference days.


The show represents a great opportunity to meet a large part of the PyCharm Team, learn about current developments, watch a live demo or just say hi. We invite you to stop by our booth with your questions and chat about your experiences with PyCharm and other JetBrains tools. We will be raffling PyCharm licenses so be sure to register and grab some of our cool giveaways.

PyCharm team members are going to attend two very important satellite events: Python Language Summit (May 28th) and Python Education Summit (May 29th). Andrey Vlasovskikh will give a talk on PEP 484 and Type Hinting adoption. Dmitry Filippov and Anna Morozova will be at Education Summit to talk about PyCharm Edu and current JetBrains educational initiatives. If you’ll be there, feel free to find and chat with us about latest trends in the Python world.

Also, some of our developers will join the Development Sprints (June 2nd – 5th). Would you like to join us or invite to your own sprint? Come to our booth to discuss things!

We’re looking forward to meeting you at PyCon!

-PyCharm team


Posted in Conferences & Events | 1 Comment