• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics in ~comp with the tag "design". Back to normal view / Search all groups
    1. Tkinter vs PyQt vs wxPython vs PyGtk vs Kivy: Too many options with nuanced pros and cons causes analysis paralysis and difficulty in taking decisions

      The good things about Python which make it a very ubiquitous language worthy of learning (platform agnostic, elegant syntax, portable standard library and ecosystem packages, etc.) unfortunately...

      The good things about Python which make it a very ubiquitous language worthy of learning (platform agnostic, elegant syntax, portable standard library and ecosystem packages, etc.) unfortunately also has this weird side-effect of causing tremendous pain when it comes to choosing which library or toolkit to use for say, a side project for a Desktop GUI app.

      It seems as if researching about these Python GUI toolkits, finding out their pros and cons and nuances has itself become a dedicated project of its own and I have almost forgotten about the actual app and user story for which I was looking them up in the first place!

      Though I'm almost certain at this point that Kivy isn't something I'm going to use. I don't want my app to run on android, at least not presently. And even if a need arises in future, a more efficient path there is to use something like Java with an Android IDE.

      Plus a 100% pure python toolkit means some sacrifice in performance. With PyQt and PyGtk, you can get the raw performance of underlying C++ and C runtimes respectively which they wrap.

      Now tkinter and PyQt is where I'm really confused and not able to decide which one to use. The pros of tkinter are highly appealing to me, to be honest. The fact that it comes built-in with python and right out of the box - which incidentally also frees you of all the licensing hassles unlike PyQt/PySide stack is also a great plus. Though this particular project is going to be open source anyway, so it shouldn't matter much. But in the long run and generally speaking, it's clear that one has the licensing advantage here.

      Secondly, tkinter also has the advantage of being smaller in size. Since it comes built-in, the final portable EXE size would perhaps be as small as that of just the portable python interpreter using PyInstaller or something?

      But on the other hand, smaller size doesn't really matter in the age of gigabyte high-speed Internet, does it? And I've seen some PyQt projects too that seem to create smaller bundles with efficient packaging, wonder how they are able to do that!

      One criticism of tkinter I came across is that while getting started with a Hello World GUI is easy, making something non-trivial soon leads you down a rabbit hole which is filled with messy and hacky workarounds. For example, there isn't a native or built-in support for creating a system tray icon for your app which is considered pretty much a standard feature for desktop GUI apps these days. Even for adding this trivial feature to your app, you must install a third party package called pystray which isn't a very thrilling experience at all. Imagine what all you'll be going through if you want to implement say a complex data grid with dropdown widgets or a complex tree view widget.

      But PyQt, on the other hand, also has its own set of criticisms. For starters, since the core toolkit is written in C++, the Pythonista must hack their way through all the object orientedness mandated by the core libraries in ways that don't seem very pythonic. For example, you can't pass a simple tuple with (x,y) co-ordinates for a widget location or size, you must find the corresponding widget class such as QtSize or whatever to be able to do that.

      This is what I got from my reading and youtubing so far. I don't know how hard this usually is in practice. Coming from a C# and Java background, I don't think it should be for me. But I'd like to know from more experienced Python programmers who have traversed both these paths (tkinter and PyQt) - which path is better as a learning investment in the long run?

      17 votes
    2. Is it possible (or normal) to release a Desktop GUI app using PIP/PyPI instead of regular tools like PyInstaller?

      Folks, Firstly, thank you for guiding me with remarkable insights to my queries about Desktop GUI development using PySide in my earlier post. After much thinking, pondering and meditation, I've...

      Folks,

      Firstly, thank you for guiding me with remarkable insights to my queries about Desktop GUI development using PySide in my earlier post.

      After much thinking, pondering and meditation, I've made up my mind with using PySide2 for this side project.

      Since my app is cross-platform and geared towards power users (who must be having python installed in all likelihood), I want to know if it's feasible to release it through PyPI (PIP) instead of bundling a setup or MSI? Or is this going to be a bit odd?

      Are there any such apps already that do this?

      10 votes
    3. PySide vs .NET WinForms for a Desktop GUI App in 2023?

      Hello Folks, For an upcoming side project - a Desktop GUI app, open source, Apache 2.0 licensed, I'm slightly confused regarding what technology to use. Skills wise, C#/WinForms should be my...

      Hello Folks,

      For an upcoming side project - a Desktop GUI app, open source, Apache 2.0 licensed, I'm slightly confused regarding what technology to use.

      Skills wise, C#/WinForms should be my natural choice as that was the primary technology I had worked on before losing employment at my former company few years back and getting into freelancing. But post my freelance experience, I taught myself things like open source and Python as it came with the territory, and now PySide2 is also a running candidate in this race.

      The goal here is to be as much ubiquitous as possible - that my app should be easy to just "download, extract and run" by as many people as possible. A couple decades ago, a .NET GUI library targeting Microsoft Windows platform would have been the clear choice here as most people used Windows OS and targeting that platform meant being ubiquitous.

      But over the last few years, I've observed that Windows OS has been continuously losing its market share to Linux Distros and Mac OSX, mostly due to some incorrect decisions and strategic blunders by the former than some ground breaking or revolutionary innovation on part of the latter. This means .NET or WinForms is no longer the ideal choice today if you want to be cross-platform and ubiquitous.

      This lead my research to some other toolkits like the Java Swing library, for example. It's old but classic, not a bad choice at all in this case, platform independence is Java's biggest selling point. However, the app I'm making is non-trivial and slightly performance intensive, and Swing GUIs are known to be sluggish on PCs unless you ensure a good supply of RAM by tweaking the JVM settings. I'm also not very experienced in Java to be able to handle those situations in case they arise.

      I also considered Lazarus IDE/Object Pascal, it is also not a bad choice. It is open source, used as the primary course language across many Universities in Europe and most importantly, still maintained and developed. But guess I will have to teach myself a whole new paradigm along with a programming language in case I go this route.

      Finally, Python is something I've almost settled on for this project. It's a language that I'm very fond of and it has helped me survive through the tough times in the freelance market. It also has a vibrant ecosystem and rich repository of user contributed packages at PyPI.

      Now, I've worked on the default Tkinter library in past but somehow felt that it's quite limited in terms of making the GUI more flexible and "tweakable", especially a non-trivial one having several container widgets, syntax editors, menus and drop-downs, trees and list views, etc. PySide2 is, from what I understand, a better choice in this regard as it is comprehensive and based on the time-tested Qt interface. It is not only very easy to code and maintain but also very easy to port across various platforms.

      What do you think? In which direction should I go here?

      18 votes
    4. What is your framework for back of the envelope/ MVP style software design?

      I suspect many don’t write anything down and do this largely by intuition/experience but I want to tease out some ideas. when it comes to describing and designing a system from a blank piece of...

      I suspect many don’t write anything down and do this largely by intuition/experience but I want to tease out some ideas.

      when it comes to describing and designing a system from a blank piece of paper, what are the parameters you think of?

      I’m thinking napkin sketch level of software design.

      So things like:
      Number of users, are they concurrent users, what load dimensions there are (disk IO, network IO etc.), target platform (everything is a web app these days), how do you design/visualise the data model?

      Any decisions or constraints that impact what and how you build a proof of concept / MVP? How do you document this? How do you test it against the finished software?

      7 votes
    5. How would you write a GUI? Seeking opinions, recommendations, and what to avoid.

      Hi all. I am asking this open-ended question (bottom of this post) because I am considering making contributions to an open-source project that would directly benefit me and other users. Some...

      Hi all. I am asking this open-ended question (bottom of this post) because I am considering making contributions to an open-source project that would directly benefit me and other users.

      Some background:

      I have worked with an engineering simulation software called Ansys MAPDL basically everyday for the last 4 years, in both an academic and a professional capacity. It's not necessarily relevant whether you are familiar to that program to participate in this discussion. The relevant thing is that the GUI for MAPDL is written in Tcl/Tk and I don’t imagine it is going to be modernized (because of more modern, but distinctly different, replacements). This is a screenshot of the GUI for reference.

      Why do people put up with such an old interface?

      The power of the program is not its GUI, but the scripting language that can be run to setup and solve simulations. The program name is really the scripting language name, Ansys Parametric Design Language (APDL). It's somewhat like Matlab. The program also offers an enormous amount of control when compared to the more modern GUI that's been released, since the modern GUI holds a totally different philosophy.

      The older GUI is really helpful in certain circumstances because it will spit out a file containing commands that were used in the session. This is a great demonstration of how to run a command or use a setting/config command, but a lot of newer features are buried in the documentation and aren't available in the older GUI.

      My coding experience

      I know the MAPDL language very intimately, but my experience beyond it is limited to some Perl scripting, and a bit of Python exposure.

      Motivation

      Open-Source Ansys API

      Recently, Ansys started supporting an open-source Python project called PyAnsys. MAPDL is otherwise fully closed source, and this is really the only public-facing API. PyAnsys has basically converted a lot of MAPDL script commands to a pythonic format, hence Python can now be used to interact with MAPDL. This is great for several reasons, but is limited regarding interactivity. Interacting with MAPDL via Python is basically happening in a fancy console via Jupyter notebook or IDE like Spyder. Certain commands will bring up Python-based graphics displays of solid models and results plots, but there isn't a dedicated GUI open all the time.

      The Question(s)

      My question is whether it is feasible to write a frontend GUI to a bunch of python commands. If you were going to do it, how would you do it? What might you write it with? Would you even do it? Is this a stupid endeavor?

      7 votes
    6. Web Design Work

      Hi everyone! Per admin recommendation I'm posting this in comp. I would like to switch Staining The Timbre from a blogspot domain to its own. I can handle the paperwork and whatnot associated with...

      Hi everyone! Per admin recommendation I'm posting this in comp.

      I would like to switch Staining The Timbre from a blogspot domain to its own. I can handle the paperwork and whatnot associated with the url change, but I would like to hire a web designer to spruce up the joint a bit. Right now I'm using a default theme provided by Blogspot and, while it serves its purpose, it makes the page look like it's run by a high schooler.

      It should be a relatively basic project. I don't need anything for commerce set up, or anything I think of as "crazy". Just a very basic blog layout that looks professional on both desktop and mobile (the latter is a little lacking in particular right now). Archive links, Tags, ability to comment on posts, Contact Info, and one that preferably preserves the large-picture format the site currently has; that's about it, aside from being able to create the posts themselves.

      If anyone is interested please send me a private message. This is very much still in the quoting phase, but I appreciate any assistance you all can provide me in getting an idea on cost.

      Thanks in advance!

      8 votes
    7. Weekly Programming Challenge - making our own data format

      Hi everyone! There was no coding challenge last week, so I decided to make one this week. If someone wants to make his own challenge, wait few days and post it. I'm running out of ideas and I'd...

      Hi everyone! There was no coding challenge last week, so I decided to make one this week. If someone wants to make his own challenge, wait few days and post it. I'm running out of ideas and I'd like to keep these challenges running on Tildes.


      Everyone here knows data formats - I'm talking about XML or JSON. The task is to make your own format. The format can be as compact as possible, as human-readable as possible, or something that's really unique. Bonus points for writing encoder/decoder for your data format!

      How do you handle long texts? Various unicode characters? Complex objects? Cyclic references? It's up to you if you make it fast and simple, or really complex.

      I'm looking forward to your data formats. I'm sure they will beat at least csv. Good luck!

      8 votes