PyCharm Community Edition

PyCharm Community Edition

  • mdo  DigitalBox
  •   Dev
  •   December 24, 2024

If you write Python programs on Haiku, you might already have used a default editor like Pe.

However, if you create more complex programs, a great IDE for that is PyCharm Community Edition.

In this article, we will review the features proposed by PyCharm.

To install PyCharm Community Edition, search for "pycharm" in HaikuDepot in the "all packages" tab :

Proceed with the installation.

The current version available on Haiku is the below and requires OpenJDK to be launched :

The first time PyCharm is launched, you must confirm the terms :

First program

The main screen displayed at the start let you the possibility to create a new project :

Click on "New Project" as we will use it in this article :

At the beginning, the project is empty and has no file.

Let's add a new python program via the "File> New" menu :

Indicate that the file added is a Python File :

Indicate the name "HelloHaiku.py" :

Now do a copy/paste of the Python program “HelloHaiku.py” which has been used in the article "Use Python and Haiku API" :

The Python Interpreter must be indicated via "Configure Python interperter> Interpreter settings" :

We suppose that python3 has been installed.

Indicate the fullpath of the python3 interpreter which should be "/bin/python3":

PyCharm IDE will do some updates like below :

Once done, you can run the program :

If you got this error, it's normal :

You have to install Haiku PyAPI like below :

install haiku_pyapi_python310

Launch the program again.

You should see the "Hello World!" message displayed in the ""Hello World" application :

Features

One great feature of PyCharm is that it let you debug your program easily.

You can put breakpoint in your code :

Let's launch the program in debug mode :

The breakpoint will take effect :

And of course you can step over/step into :

So that you can go through the interesting parts of the program :

In case you need to inspect the values of variables or constants, it's possible with the evaluate feature :

You can also evaluate functions, like the Bounds() method below :

Or even the Text() method :

However if you try to evaluate the instance of a class like the "label" below :

It will not be very interesting as you can't go into protected attributes :

You can also consult the thread structure on the left, to identify how the various calls are done from the main until deeper functions :

You will also have some advices regarding your code :

Or the advices will be directly displayed in the source code :

PyCharm also proposes an integration with version control tools :

The below functions are available in the "VCS" menu :

I didn't check these features, so you will have to check by yourself depending on your needs.

Please note the appearance can be changed.

Especially the "Appearance> Show main menu in separate toolbar" which will display the menu at the top of the window - instead of an icon :

You can also select in the "Settings" some color schemes :

Some plugins are also proposed in the settings :

The last feature which I have found useful is the refactoring.

You can for instance rename variables or methods :

I advice you to give PyCharm a try.

The only drawback I can see for the moment is that it's a java application, meaning it will be slower compared to native IDEs like Genio or Paladin.

In case you would like to learn more, you can check the PyCharm official website for all the details:


Powered by Bludit - Hosted by Planet Hoster
© 2025 Haiku Insider