Announcement

Collapse
No announcement yet.

Simple GUI over a bash script

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Simple GUI over a bash script

    I want to develop a GUI to go over a bash script. The GUI would provide an easy way to pass a dozen or more arguments easily, some from text entry and some from drop down lists. I think it's a little more complex than KDialog could easily provide. Is Kommander still the choice for the next level of complexity? If so does the old tutorial/eample still work? TIA
    An old mainframer trying to get modern in his retirement.

    #2
    If I were going to write a GUI with a scripting language, I would take a good look at Python and Qt. There's a package called python-qt4 that can be installed. You can write relatively simple GUI apps easily. In addition, you can make some fairly complex GUI apps.

    Almost all of the Qt widgets are available: List widgets, Combo Boxes, TextEdit widgets, etc.

    Comment


      #3
      Kubuntu 13.04 current, KDE current

      I took Andy's advice and invesigated Python. I did the tradional "Hello World" and a saved script. So Python works and I have a small clue about how it's coded. Since I have four+ decades of programming experience (on what are now mostly antique languages) I went looking for an IDE to assist me. Eric seemed pretty good so I got it from the Kubuntu repositores and found a tutorial. The first time I executed "eric" I got a segmentation fault. Some investigation showed:

      eric - 4.5.8-1
      python - 2.7.4 Ubuntu-1
      python3 - 6.1.2.0-1
      python-six 1.2.0-1
      python-qt4 4.10-0Ubuntu3

      Do I have too many Python versions installed? Which should I keep? Is there another issue that caused the fault?
      An old mainframer trying to get modern in his retirement.

      Comment


        #4
        "python" and "python3" are 2 versions of python. They can coexist on your system. Much of the example code on the internet is 2.x python.
        /usr/bin/python is a symbolic link to one of these versions. Check out which version yours points to in order to get an idea of what your system would use by default.

        "python-six" is a compatibility library for "smoothing" the differences between python 2.x and python 3.x.

        python-qt4 includes the modules needed to use the Qt4 bindings in python.

        I, personally, don't use Eric. All I need from my editors is syntax coloring -- gvim and kate do just fine. For debugging larger scripts, I insert the following line in the script to start a debugger so that I can step through the code and examine values:
        import pdb; pdb.set_trace()

        As a test, I installed eric. It crashed for me as well with a Segmentation Fault. I am not sure what is wrong.

        Comment


          #5
          Thanks Andy, for the quick response. I think I'll just play with Kate as an editer for a while and see if someone else discover what's up with eric.
          An old mainframer trying to get modern in his retirement.

          Comment

          Working...
          X