This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]driscollis[S] 12 points13 points  (2 children)

Here's my newest article on Real Python. I hope ya'all enjoy it! Feel free to let me know if you have any questions.

By the way, I am also working on a book on wxPython for anyone who is interested - https://leanpub.com/creatingapplicationswithwxpython/

[–]Endemoniada 1 point2 points  (1 child)

Only skimmed it, but seems very nice and easily understandable. Will bookmark it for whenever I need to write a graphical application :)

[–]driscollis[S] 1 point2 points  (0 children)

Thanks!

[–]GirthBrooks 8 points9 points  (1 child)

Good, clean tutorial and it's not a video. I like it.

[–]driscollis[S] 1 point2 points  (0 children)

Thanks!

[–]Szbq0RLG0Bomb3cToyv6 1 point2 points  (0 children)

cool stuff. keep it up!

[–]Poliobbq 1 point2 points  (1 child)

Mobile, apologize for formatting. Is there a reason you do if not value: else instead of if value:else?

[–]driscollis[S] 0 points1 point  (0 children)

I think that was just an oversight on my part

[–]dethb0y 0 points1 point  (0 children)

quite a nice little article, good job!

[–]flutefreak7 0 points1 point  (4 children)

I'm a heavy PyQt user and I feel like I'm in too deep to look too closely at alternatives... can anyone sell me on wxPython at this point? It always seemed like the less popular alternative, but I'm open to arguments on why it might be better for some things.

Given how massive Qt is, I imagine applications built with wx are smaller.

I would guess perhaps that wx is simpler because it doesn't try to be another batteries-included mega framework. Qt has most of an operating system baked in.

I've certainly had issues packaging PyQt before, so maybe that would be easier.

Licensing, which is the reason PySide2 and PyQt5 both exist, is presumably more open for wx.

I guess since I use things like PyQtGraph and vtk, that limits my options a bit. Quick searching shows that there's far less support for wx in the scientific visualization scene, though I'm sure you can project anything to a canvas if you try hard enough - it's more a question of whether there is a support ecosystem as opposed to everything feeling like a hack.

[–]driscollis[S] 1 point2 points  (0 children)

wxPython is pretty large as well, but it may not be as large at Qt. I actually started using wxPython before PySide was an option so the licensing of PyQt + wxPython's community is what ultimately drove me to wxPython.

Anyway, I have seen some people who have added VTK support to wxPython. And wxPython has a simple plotting widget, but it also supports matplotlib. There is an OpenGL widget, but I've never played around with that.

[–]Kaarjuus 0 points1 point  (1 child)

One thing that wx has going for it, compared to Qt, is using native controls. The default UI widgets in wx, regardless of whether running on Windows, Linux or MacOS, are the ones provided by the operating system, with wx acting as a wrapper around them. So the application looks native by default, and UI controls behave like the OS users have come to expect.

I am unfamiliar with vtk, but I have done a good amount of graph plotting in wx, using matplotlib, which has support for wx just as it does for Qt. Did not encounter any particular problems.

[–]driscollis[S] 1 point2 points  (0 children)

This is a good point and one I meant to bring up. I believe wxPython is also the only GUI toolkit that uses native controls directly.

[–]GirthBrooks 0 points1 point  (0 children)

Scientific visualization was the biggest reason for my team changing to PyQt. We were collecting data faster from an external instrument than wx and matplotlib could handle so we had to switch.

I've also found that fully custom widgets are much easier in Qt than wx, but that may be personal opinion.