Feature Spotlight: Editing remote files

Happy Friday everyone!

In today’s blog post I’m going to cover a new feature recently appeared in PyCharm 4.5.x series: editing files directly on remote hosts. In a previous blog post, Feature Spotlight: Python remote development with PyCharm, I covered some basic principles of remote development using PyCharm: how to set up a remote interpreter for your project, vagrant box, VM, or even bare metal machine, and how to set up the deployment of your local project to the remote host. This post supplements the earlier one by focusing on editing files directly on remote hosts.

So let’s get started. At this point I assume you already have a remote host up and running, and the remote interpreter and deployment options properly configured in PyCharm.

At any time during development, you can go to Tools | Deployment | Browse Remote Host. This action will open the dedicated tool window for browsing remote files inside PyCharm:


In this window you can perform some common file operations, like renaming files and directories, changing permissions, copy/paste/delete, as well as creating new files and dirs. But what is most useful here is that you can open any file like you do in the project view:


See that special toolbar at the top of the editor? It tells you that the opened remote file hasn’t been changed yet. So let’s make some changes. Note that when you edit the file, PyCharm provides all the usual goodies like autocompletion, error-checking, quick-fixes, etc.:


When you’re done with changes, the toolbar indicates that the file has been changed and asks you if you want to upload it. Before the actual upload, you might want to compare the changed file with its previous state. Click  on the toolbar to inspect the diff:


You can revert your changes any time, by restoring the file to its previous uploaded version:


Finally, click  to upload your file.

I hope this feature makes your remote development even easier.

Have a nice weekend, and talk to you next week!

Posted in Cool Feature | 4 Comments

PyCharm 4.5.3 RC is available

Today we’ve published the PyCharm 4.5.3 RC bug-fix update.

The Release notes lists all fixes from the previous PyCharm 4.5.2 update. The most notable among them are:

  • a number of fixes for Django support, mostly related to the new manage.py tool.
  • a number of fixes for the Python formatter, especially PY-16078: changing the default right margin to 99 symbols according to PEP8.
    Note: This parameter is configurable. You can change its value in Settings(Preferences) | Editor| Code Style | Python | Wrapping and Braces | Right margin
  • a bunch of improvements in Python refactorings and the new auto-intention: convert tuple to list and vice-versa which is available on Alt+Enter over the cursor on a list or a tuple.

Additionally, this build introduces the new option in Python code style settings: “After local imports” on the “Blank lines” tab. Using this field, you can specify the number of blank lines to be inserted after local import inside a function. By default this value is set to 0.

Download PyСharm 4.5.3 RC for your platform from the project EAP page and please report any bugs and feature request to our Issue Tracker. It will be available shortly as a patch update from within the IDE as well. Make sure you’ve selected the Beta Releases channel in update settings.

Develop with Pleasure!
-PyCharm team

Posted in Early Access Preview | 1 Comment

Interview with Pedro Kroger, Author of Modern Python Development with PyCharm

coverPublished earlier this year, Modern Python Development with PyCharm by Dr. Pedro Kroger reveals the best Python programming practices while using PyCharm. Relying on his 20 years of extensive programming and using different programming tools, in his book Dr. Kroger delves into essential topics of setting up PyCharm for your needs and then get the most out of its numerous development features, ranging from the editor basics and essential shortcuts all the way to specialized tools for remote development, version control and web programming. Modern Python Development with PyCharm is recommended for both beginning Python programmers and those coming to PyCharm from other IDEs or text editors.

Our own Dmitry Filippov seized the opportunity and interviewed Dr. Kroger. Read on to learn more about the man, his programming experience and his vision.

- Hi Pedro, could you tell us a bit about yourself and your day job?

I’m a professor based in Brazil, where I teach music composition, harmony, counterpoint, and music analysis. Although my main background is as a modern classical composer, I’ve been programming for more than 20 years and combining these two skills. For instance, for my Ph.D. I wrote a meta-language for sound synthesis using XML and Tcl. My main research interest these days is to write programs to analyze and understand music. I’ve used Tcl and Lisp in the past, and now I use mainly Python. For example, now I’m writing Python programs to analyze the similarities in Mozart’s, Beethoven’s, and Haydn’s string quartets. It’s a lot of fun!

- Your book says you’ve been using Emacs for more than fifteen years. As a Python programmer, could you tell us why you switched from this great editor over to PyCharm and what it is that still makes PyCharm your IDE of choice?

I still use Emacs a great deal, only less than before. For example, I have yet to find a faster way to rename files in a directory than using dired. At one time I was doing everything using Emacs, including reading email and browsing the web. Although I love its extensibility, Emacs is starting to show its age. This post I wrote years ago shows the length you have to go to get some useful features such as code completion and navigation to work. I love that PyCharm has all these features I mentioned in the post out-of-the-box: all I need to do is to define the Python interpreter and start coding.

- What are your favorite PyCharm features that you can’t imagine working without?

PyCharm has a lot of killer features (fantastic code completion, great debugger, etc.), but I think the biggest selling point for me is the integration of features and languages. Everything works out of the box and in similar ways in Python, JavaScript, HTML, CSS, etc. Also, I have a horrible memory, so code completion and inspection helps a great deal.

- How much time did it take you to learn PyCharm from scratch? Do you think learning tools is a big part of a developer’s trade?

It didn’t take too long, since it has a gentle learning curve. On the other hand, it’s packed with features, so I guess I’m still discovering new things every day.
I think learning tools is essential, even if only to know how things are done on “the other side.” For instance, I’ve been learning Vim to understand how I can be more efficient editing text (and PyCharm has a great Vim plugin!).

- Every serious project is not only about Python. It often involves testing, isolation of environment, deployment, version controlling, database management. How does Pycharm help you manage all this stuff?

I love that PyCharm has support for all these things, but to be honest I use the command line or specialized tools (such as Tower for version control, Fabric for deployment) for most of these tasks. I’ve been using them for so long that they are second nature to me. I do run tests using PyCharm though. I love to see the big green bar :-)

- What other developer tools help you be more productive? Would you recommend any to other Python developers?

It’s hard to make recommendations because everyone has a different need. I guess the best thing is to focus on the basics: learn your shell, version control tool, editor, etc., and try not be religious about it. Use the best tools for the best job.

- There are several Web frameworks backed by Python, including Django, Flask, Pyramid, and Google App Engine. What are your personal and professional preferences?

I’m not much of a web developer, although I have done some small projects using Django and Flask and I like both. If I were going to work professionally as a web developer, I’d pick Django. I like the focus on batteries included, great documentation, and stability.

- Python is an open-source project and everything around it is open source as well. In your opinion, how does the open-source concept influence and shape the enterprise software? Have you used any open-source projects in your professional career? Which ones do you like the most?

I think free/open source is fundamental. Many things we take for granted today (such as Google search) was built using open source. Also, open source is essential for education. I use a lot of open source programs, including Linux, FreeBSD, Music21 for music analysis, LaTex, Pandas, and so on.

- There are two major versions of Python currently co-existing: 2.x and 3.x. What do you think about the current state of Python? What’s your take on the future of the language?

I don’t understand the naysayers. Python 3 is a great language and its future is bright. Unlike some languages that tried to reinvent themselves and never delivered, Python 3 is here now and most big and important libraries have been ported. I think 2016 will be the year of Python 3 :-)

- What do you think makes Python unique as a language?

Python is a great language because it’s super powerful and yet has a gentle learning curve, not to mention loads of libraries and tools. I have taught both Lisp and Python to non-programmers and, although one can learn the basics of both in a few hours, Python wins for having more available out of the box.

- What do you think about Python as a language for teaching and learning programming? How can tools help learners to harness the learning curve?

As I mentioned in the previous answer, Python is a great language for teaching. When I teach, I like to start by using a functional approach (since most people have learned functions in high school) and move to classes afterwards. In same languages you have to start with classes from day one, which in my experience makes things more difficult for the beginners. The main roadblock when I was teaching was finding an appropriate editor for the students. If the tool is too difficult, the student has two things to learn; the language and the tool. I haven’t tried the PyCharm Educational Edition yet, since I’m not teaching programming these days, but it looks great!

- Please recommend two other books on development you enjoyed reading recently or just consider important.

The development books I read these days are specific to what I’m working on. For example, the last book I read was Python for Data Analysis, by Wes McKinney, which is only suitable for those interested in data analysis. Although these are not Python books, I highly recommend Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman and Paradigms of Artificial Intelligence Programming by Peter Norvig. There is a lot of beautiful code in these books.

- Thank you for the interview, Pedro!

You can buy Modern Python development with PyCharm on Dr. Kroger’s website. He also runs his own blog, so don’t forget to check it out!

Dr. Pedro Kroger

I’m a programmer, classical composer, bootstrapper, and class clown who loves teaching and traveling. I live now in colorful Salvador (Brazil). I also lived in Austin, San Francisco (USA), Rome (Italy) and London (UK). more …

Posted in interview | Leave a comment

Feature Spotlight: Python Code Coverage with PyCharm

Happy Friday everyone!

Hopefully, most of us are aware of what code coverage is and how it’s being used in the software development process. It helps ensure that our code actually is executed and what’s equally important, our tests actually are testing our code. This is essential for any software written in any language, including Python.

I’ve already covered how PyCharm helps you write clean, quality, maintainable code as well as test it with the integrated graphical test runner. This post will supplement earlier blog posts by highlighting Code Coverage support available in PyCharm.

Basically, everything is quick and simple. To collect coverage statistics, all you need to do is have your code open in PyCharm, have the project Python interpreter specified in the project settings, and have one or several run configurations (preferably including some configurations for tests).

In this short example, I have a project open in PyCharm, with Python interpreter defined in the project settings:


This project contains some tests, which can be run by the nose testing framework. I define the test configuration in PyCharm by clicking “Edit configurations”:


After that, I specify my new ‘Nosetest_run’ configuration in the dialog:


So now I’m able to run my code using this configuration in different modes, including simple run, debug, profiler, and especially ‘Run with Coverage’:


When done, PyCharm gives me the full report on the test run, including coverage data:


Browse the coverage tool window to check the coverage percentage for each directory or file. You can also navigate to any file straight from this tool window, as well as perform other common actions like “Generate Coverage Report” which will show you the full coverage report in HTML:


Note that you can inspect the result of the coverage report right inside the editor. In the left-hand editor gutter, PyCharm marks covered lines with green, and uncovered ones in red:


By the way, PyCharm uses the standard coverage.py tool created by Ned Batchelder. To have it working, make sure it’s installed on your project interpreter (check your PyCharm project settings).

That’s it! I hope you try this very useful code coverage integration and make use of it often.

Just in case you’re craving for more details, check out the official PyCharm documentation.

Talk to you soon,

Posted in Cool Feature | 2 Comments

PyCon APAC 2015: Winners of PyCharm License Raffle

logoRecently we got back from PyCon APAC 2015 that took place in Taipei, Taiwan a couple of weeks ago. What a great conference it was!

The PyCon APAC is now the third largest Python conference in the World after original PyCon and EuroPython. This year it hosted around 700 attendees with more than 40 talks in three different tracks:


With our booth in the expo hall we had a great chance to talk to hundreds of people, answering questions about our company, products, PyCharm itself, and collecting valuable feedback:


We also gave a talk on Python Debugger Uncovered which was met with a lot of interest, interesting questions and feedback afterwards:


At the end of the conference there was a PyCharm licenses raffle in the Bingo game format, conducted by conference organizers and supported by JetBrains:


During the conference we held another Pycharm license raffle, right in our booth . With some cool swag up for grabs, conference attendees were very excited about the PyCharm licenses draw.

And now we are happy to announce the list of PyCharm license raffle winners. They are:

  • Vincent Lin
  • Joe Su
  • Spin Lai
  • Chun Hao Chang
  • Willy Chen
  • Jaffer Li
  • Eric Yu
  • Hung Ying Tai
  • Samuel Chen
  • Hazel Tseng

Congratulations! Your license notifications will be mailed out to you in the next few days.
Participants that didn’t win still get a 20% discount for a new PyCharm personal license (if you ticked that option in the raffle application). We will get in touch with you soon with more information on how to redeem your personal discount.

With any problems, concerns, or questions ping us in comments below.

Develop with pleasure!
-PyCharm team

Posted in Conferences & Events | Leave a comment

Announcing the PyCharm 4.5.2 release update

Today we’re glad to announce the immediate availability of the PyCharm 4.5.2 update.
It’s already available for download from our website. It also will be available soon as a patch update from within the IDE (from PyCharm 4.5.x only).

As a recap, the most notable fixes in PyCharm 4.5.2 are: a couple of fixes for brand-new manage.py tool and fixes for unresolved references in Python code as well as fixes for debugger, javascript code inspections and VCS support.

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 in the comments to this blog post and on twitter.

Develop with Pleasure!
-PyCharm team

Posted in Release Announcements | Leave a comment

PyCharm 4.5.2 RC is available

Today we’ve published the PyCharm 4.5.2 RC build 141.1580, which is already available for download and evaluation from the EAP page.

This update features a huge list of bug fixes for different subsystems that can be found in the release notes. The most notable among them are: a couple of fixes for brand-new manage.py tool and fixes for unresolved references in Python code as well as fixes for debugger, javascript code inspections and VCS support.

The build is available for download, and you can also use the patch-based upgrade to upgrade from within the IDE (from PyCharm 4.5.x only) without a full re-installation. Just make sure you’ve selected the Beta Releases channel in update settings.

Should you encounter any bugs or problems in this build, please report them to our Issue Tracker.

Develop with Pleasure!
-PyCharm team

Posted in Early Access Preview | Leave a comment

PyCharm Support: For any problem you may have, we’ll find a solution

All JetBrains products are known for their free, quality technical support. We at PyCharm are here to help you with any problem you may come across while using the IDE. Whenever you have a question, doubt, bug or technical issue, rest assured we’re eager to help!

Let me just give you some pointers on how it’s best to contact us to get your problems solved as quickly and easily as possible.

In short, here are the channels you’re welcome to use to get support:
bug tracker, blog, Twitter, forum, Facebook, sales support, and of course technical support.

That said, some issues may be more quickly and easily solved on your own. If you have a question about product usage or a specific feature, first please consult this webpage which lists many useful links: PyCharm tutorials, keymap references and PyCharm online help, as well as demo videos, webinars and screencasts from our YouTube channel. In addition, this blog also has a lot of feature highlights. Do also check our community forum to see if someone has already answered your question.

If no answer is in sight after this, use one of these two powerful tools:

1. PyCharm’s public bug tracker. No matter which PyCharm edition you’re using, feel free to report a bug if you experience any technical problems. You can also look through issues others have reported, vote for them, and request new features. Whenever your issue is updated, you will received a notification:


Our developer team does use this tracker internally: we go through, prioritize and resolve dozens of issues every day.

2. PyCharm Technical Support. When bugs are not the issue, but you need help with setup, customization or some general questions, you’re welcome to submit a technical support request. Go to https://intellij-support.jetbrains.com/home/ and switch to the “SUBMIT A REQUEST” tab. Here, please provide your email address, specify the product you’re using, and describe your question or problem in as much detail as possible:


Our support team will respond to your request by email as quickly as humanly possible.

To track your request history, use the “CHECK YOUR EXISTING REQUEST” tab.

Just a couple of hints to speed up the process and avoid any delays in getting help:

  • Make sure you provide all the information required in the form. We especially need the details of your installation, including the operating system, PyCharm version and the build number.
  • It’s always good to attach screenshots, screencasts, specific projects or files, so we can gain deeper insight into the problem you’re having.
  • In most cases, the support team will ask for your PyCharm log files. For instructions on how to get them, click here.
  • For troubleshooting performance issues like hanging or frozen UI, we have special instructions.

Additional instructions, known issues and FAQs can be found on the JetBrains Support homepage.

While it’s possible to submit anonymous requests, we recommend that you register for a JetBrains Account and use to log in to various JetBrains services (including Support). A JetBrains Account is a useful tool for managing your interactions with us, as well as your licenses, orders and other things. To open your JetBrains Account, simply log in on the support page or go directly to JetBrains Account page.

An alternative way to reach us is by writing an email directly to the PyCharm Support team. To receive speedy help, please make sure to provide the same details as in the online form described above.

That’s about it. Of course, we’re always listening to your questions, thoughts and any other feedback on our social media, including PyCharm Twitter, Facebook, forum, and this blog. Even our online help supports comments.

Whatever problems you may encounter, we’ll solve them together!

Develop with Pleasure!

Posted in Cool Feature, Tutorial | 6 Comments

Announcing the PyCharm 4.5.1 release update

Just one week after the PyCharm 4.5 release, we are pleased to announce the general availability of the PyCharm 4.5.1 bug-fix update. It 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.5 and 4.5.1 RC only).

As a recap, some notable highlights of this release include: a fix for incorrect encoding and numerous fixes for brand-new manage.py tool.

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 in the comments to this blog post and on twitter.

Develop with Pleasure!
-PyCharm team

Posted in Release Announcements | 4 Comments

PyCharm 4.5.1 RC is available

After successful launch of the new PyCharm 4.5 release almost a week ago we’ve received massive feedback from a large audience of our new and existing users. The feedback is mostly positive, but we also got some bugs reported.

Quickly responding to this early feedback, today we’ve published the PyCharm 4.5.1 RC build 141.1199, which is already available for download and evaluation from the EAP page.
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 incorrect encoding and numerous fixes for brand-new manage.py tool.

The build is available for download, and you can also use the patch-based upgrade to upgrade from within the IDE (from PyCharm 4.5 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.5.1 this week. Anyway, if you encounter problems, please file them to our public tracker.

Develop with Pleasure!
-PyCharm team

Posted in Early Access Preview | 2 Comments