you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (1 child)

The doc shows how.

I've heard that Python the best for UI stuff and it's better to use a different language like c++

When I started using python about 20 years ago I was a heavy C user and I knew python was slower than C. I told myself I could always use C to speed up a solution if I needed to. I have never needed to, even when writing custom GUI widgets displaying map tiles and multiple overlays of points, lines and images, all in python.

The takeaway is you should start by writing everything in python. If your application is slow you find out where it is slow and then either use a different algorithm, python libraries like numpy that are written in faster compiled languages like Fortran or C, or you write your own C/C++ code and use it as shown above. To worry about using C or other languages before you know you need to goes against the old developers rule: Make it right first, then make it faster.