Skip to content

Improving Python performance with PyCharm

PyCharm
Tags:

The more I work with PyCharm, the more I like it. Now it’s time to make this IDE more confortable for you, using some cool features you maybe don’t know event they exist. Because this IDE is one of the best I’ve used to write Python code!

Productivity guide

You can find this feature under the Help menu.

Productivity Guide

Productivity Guide

The result of this feature is to show you statistics of PyCharm features that will make you write better Python code. Of course, I’ve never seen a feature like this on any IDE from all I’ve used programming (even with any language).

Productivity Guide

Productivity Guide

Así puedes obtener consejos para mejorar.

Keymaps

Although you have a keymap availabre and predefined, maybe you want to modify it in order to fit your needs (I already told you that investing time while configuring the IDE is one of the best think you can do using PyCharm, and afeter that, export and import the configuration). You can access from Settings:

Atajos de teclados

Key bindings

Now, it’s time for you to define your favorite shorcuts. There is also a search textbox, that it’s very useful because of all posibilities available. There is a plugin called Presentation Assistant that shows the key bindings of the things users do!!

Some features I recommend to to activate

There are a few characteristics that are deactivated by default, and at least, I would activate. One of them is collect runtime types, while you execute code.

Información en runtime

runtime info

Another feature I would activate is case sensitive. You can modify the option here:

Sensibilidad a mayúsculas y minúsculas

case sensitve

Another cool feature I recommend you to activate isto mark modified files, that’s is, files that need to be saved:

Modificaciones en ficheros

Mark modified tabs with asterisk

Another feature desabled is modify the font size using the mouse.

Cambiar tamaño de letra

Font size

Writting good Python code

The Python rules for writting good code are the PEP-8, you can read it here. I already wrote about how to write good Python code, but now, you have a veri noce help from PyCharm. Look at the right part of the code and you can notice marks with diferent colours, each of them is a problem:

Guia de estilos PEP 8

But even more, you can modify (and of course, export and import) the option for writting good code. How? Right clic on this zone and you’ll have this window:

Modificación de opciones

Modificación de opciones

Click on Configure highlightings level:

Configure inspections

Configure inspections

And you modify everything that you want to be noticed in red, yellow, green, ….

Inspections

Inspections

As you can notice (as well), you can export (and import) the configuration, not losing your time!

If you are reading this, you can notice I like PyCharm a lot, and is the IDE I’m using, mainly because it helps me to write better code, more quickly and with more help. The debugger is not as good as the PyScripter, but I must admit I’m confortable with it.

To end with, I recommend you this video, how to debug Python using PyCharm:

Have a nice day and happy coding!

Manejando Datos Newsletter

Noticias, entradas, eventos, cursos, … News, entrances, events, courses, …


Gracias por unirte a la newsletter. Thanks for joining the newsletter.