I found this very cool Python menu that will display a GUI menu in the terminal. Is this possible to do in c? I've compile a little hello world in gtk+ 2.0, but it looks like it will only run in X11.

Python Menu


Yes. You can use the ncurses menu library (http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/menus.html). Which is actually what that python code uses to generate the menu.

But making the menu in C will be more work and look exactly the same as the Python version. So unless you have a good reason to use C I would suggest sticking with Python.


You could alternatively use this library called Termbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.