Has anyone used Python to code cross-platform GUI applications? I'm writing a program and would like to be able to run it on various OSes (and phones).
Been googling various toolkits but I'm not sure which ones are good. Any advice from Jow Forumsents?
I heard it's the most complicated of the bunch. Have you ever used it?
Aiden Murphy
This.
Xavier Gonzalez
Qt is good, just remember the license is limiting.
Lincoln Bell
Having a desktop python application is one thing, having it also run on iOS and Android is another whole ball game. Just don't. It won't be worth your time.
Benjamin Jones
I've been using this recetly to build a gui for an application I'm writing. I started out using tkinter but it was such a pain in the ass to do stuff in it because it was so basic. PyQt is much better, I disagree that it's more complex, it is literally just a proper framework for building a GUI with proper features like event handeling etc. Mind you my first expereince of writing a GUI was in java, so I kinda have that as the base as what I expect elsewhere.
Kayden Green
PySide is pretty simple to use. But there are even newer, easier options like
Multiplatform languages like C++, Java, C#, et cetera.
Josiah Gonzalez
Pyside2 Tkinter Flask (web)
Nicholas Cruz
Also wxpython Phoenix
Justin Robinson
I found Tk quite comfy, never tried PyQt.
Joseph White
PyQt has the biggest API because it mirrors the Qt API very closely. It's a little more boilerplate but it's also more powerful. TKinter has worked for most my hobby project needs and is simpler but if I was ever writing a desktop application professionally I'd go for Qt in a heartbeat.
Benjamin Johnson
>run it on various OSes (and phones). that's not happening. you can run cross platform GUI stuff for different OSs like macOS, windows, linux, bsd etc but phones are too different. If you want to target android, you need to specifically develop for android. if you want to target iphones, you need to specifically develop for iphones.
of course that's only true for the gui. you can write the backend of your app in portable C, or java
Kevin Richardson
Do it in web. Most isers are familiar with web and for web it does not matter what your backend is written in.
Mason Gray
>If you want to target android, you need to specifically develop for android. >if you want to target iphones, you need to specifically develop for iphones.
Cordova demonstrates this isn't true. Also react native. Like sure, you can talk shit on the webview paradigm (which RN is not) and I'd agree with 99% of what you had to say about it, but the fact that cordova works demonstrates the UI is not inherently too different between the platforms, mostly no one wants to write all the bullshit code in making user code run on two hosts with different target languages/APIs. And the fact that RN exist demonstrates that it's not impossible, it just requires a lot of money.
Brayden Bennett
that's cool. what's the best resource for PyQT? How did you learn it?
Josiah Perry
Pay absolutely no attention to these literal pajeets, OP. Are you familiar with web technologies at all? Even if you're not, you're in luck cuz they're super easy. Now, here's the good part, you can use Electron as your GUI! Your UI is written completely in HTML! Just go here: fyears.org/2017/02/electron-as-gui-of-python-apps-updated.html Thank me later (or now!)
Landon Gray
That's fucking cool. Thanks. Are there any downsides?
Gavin Phillips
Electron frontend and Python backend
Christian Jackson
Okay, admittedly I was quasi-shitposting but you're right it is cool. The downside is everybody will rag on you cuz if you're using Electron then you're bundling an entire runtime with your Python that includes a stub Chromium browser and node. It'll add about 100 MB to your app. If you can get past that and you like the idea, then fuck what everybody thinks, shit is friggin cool.
Adam Gonzalez
>It'll add about 100 MB to your app. jesus fuck. that'll be a hard sale for Linux fags.