Hi all,

Perhaps a stupid question. Some time ago, I received a rpi zeroW as a gift, but as I did not have any use for ii I passed it to somebody else in our electronics-group. Now, that person has had a +30 year carreer as self-taught programmer -starting out with BASIC on DOS machines- so he showed of some of his old BASIC applications in dosbox on the pi.

So far so good, but he had an interesting question: Years ago, I wrote a library in BASIC for screen / window applications in DOS. (you know, pop-up text-windows and so on). How do I do that on linux (in C)?

As I myself only do ‘backend’ coding (so no UI), I have to admit I did not have any answer to that.

So, question, For somebody who has mostly coded in BASIC (first DOS and later Visual Basic) and now switched to C and python, what is the best / most easy tool to write a basic UI application with window-function on linux/unix. I know there exist things like QT and ncurses, but I never used these, so I have no idea.

Any advice?

Kr.

  • Truck_kun@beehaw.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    29 days ago

    You listed python.

    If you are open to Python, I would recommend: https://textual.textualize.io/

    Edit: for clarity, the above is if you want nice TUIs (text gui in terminal). If you want actual windowed applications not in terminal, in regards to Python, I would just say use tkinter.

    Here’s a list of projects known to use Textual: https://github.com/Textualize/transcendent-textual

    There are a lot of cool projects I would suggest browsing to see what it can do, but the following pages have screenshots that do a good job of showing what it’s capable of:

    https://github.com/ChrisBuilds/moneyterm

    https://github.com/bluematt/textual-musicplayer

    https://github.com/eliasdorneles/usolitaire (I’d love to see someone do minesweeper for terminal)

    Extra: while meant for terminal usage, you can use the mouse to interact, can run programs from ssh sessions, and I believe they’ve added the ability to take your TUI into web browsers.

    …. Oh, also not restricted to Linux. It does generally work with Mac and windows (would recommend using windows terminal from windows store, it makes things look right, whereas command prompt does not display correctly.