seeking HOWTO -- write simple desktop app

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
SaintDanBert
Level 4
Level 4
Posts: 449
Joined: Sat Feb 20, 2010 4:04 pm
Location: Covington, LA USA

seeking HOWTO -- write simple desktop app

Post by SaintDanBert »

The last time I wrote "desktop" applications was with pure X11 and the Athena Widgets in the 1980's.
Needless to say, my desktop app skills have a lot of dust and rust. That, and the tools and techniques
have evolved and become more complex in terms of developer choices. So I ask my question among
friends at Mint forums...

If I want to write a simple desktop utility application to run with Mint and her desktop(s), where do I start?
With Gnome and variants, MATE, LMDE, Cinnamon, KDE, GTK, and friends, it seems there is a lot of
heavy lifting involved just to get started.

I have no grief writing a command line app to do what I want. Let's call this the "gears and motors" for
what my application wants to do. Next I want to put desktop app clothes onto these gears and motors.
I can't help wondering if there are tools to help me sculpt the windows and dialog boxes and get a working
user interface all ready for connection to the "gears and motors" part of the application.

Maybe a python wrapper for my command line "gears and motors" is good enough, but I must believe
there paths to a simple desktop utility in addition to scripted wrappers.

Thanks in advance,
~~~ 0;-Dan
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29595
Joined: Wed Jul 06, 2011 3:58 am

Re: seeking HOWTO -- write simple desktop app

Post by xenopeek »

Moving it here, as I think any programmers also visit this section of the forums.
Image
User avatar
SaintDanBert
Level 4
Level 4
Posts: 449
Joined: Sat Feb 20, 2010 4:04 pm
Location: Covington, LA USA

Re: seeking HOWTO -- write simple desktop app

Post by SaintDanBert »

Thanks for noticing and doing all that you do as a moderator.
~~~ 0;-Dan
User avatar
SaintDanBert
Level 4
Level 4
Posts: 449
Joined: Sat Feb 20, 2010 4:04 pm
Location: Covington, LA USA

Re: seeking HOWTO -- write simple desktop app

Post by SaintDanBert »

I found a page of "frameworks" for writing Python apps at http://wiki.python.org/moin/GuiProgramming.
That led me to look on my workstation for the various 'mumble.py' executable files -- thinking that one might be
a useful utility application that I might use as a pattern.

Sadly, most of the files that I find have few if any comment statements so they are very awkward to study for programming details.
Q1. I know that comment statements slow down interpreter execution, but is there some other reason
why there are no comments in "production python"?

Q2. Are there any tools that let me drag and drop application widgets onto a canvas to make the user interface
for a desktop application? (I'd prefer something that is agnostic of the implementation language if that is possible.)
NOTE -- Back in those dark days of X11 work, there were tools that listed the various widgets in a dialog as a text file
that was read and processed at run time. Maybe something similar exists that uses XML or similar these days.


Q3. Does anyone know of an application or utility, written in python or similar, that would make a good
and useful program to study and learn from?

Thanks in advance,
~~~ 0;-Dan
User avatar
xenopeek
Level 25
Level 25
Posts: 29595
Joined: Wed Jul 06, 2011 3:58 am

Re: seeking HOWTO -- write simple desktop app

Post by xenopeek »

A2: If you want to write Gtk+ applications, have a look at Glade. Glade is a graphical user interface builder for Gtk+ applications.

Gtk+ is used natively on Gnome2/MATE, Gnome3/Cinnamon, Xfce, Lxde and others. Gtk+ applications also run on KDE (KDE uses Qt instead of Gtk), and though they may integrate it little less seamlessly, they will work fine. Note that Gnome3/Cinnamon is using Gtk+ version 3, the others are using version 2.

An example with Gtk+ 2: http://mo.morsi.org/blog/node/362

A tutorial with Gtk+ 3: http://www.micahcarrick.com/gtk-glade-t ... art-1.html

If you Google "Python Gtk" you will find more examples.
Image
Locked

Return to “Scripts & Bash”