Are there any Python bindings curse tool libraries?

I am writing a text hex-catcher for fun and usefulness (I intend to add syntax highlighting for many different file types), and I am wondering if there are any curse tools that I could use.

I will probably write anything to get to know how the GUI tools work, but it would be nice to find out useful libraries for future reference for myself and others.

+5
source share
3 answers

Urwid is the best curse and python library I know.

, snack (newt).

, , .

+8

npyscreen

Npyscreen - - . ncurses, .

npyscreen screenshot

#!/usr/bin/env python
# encoding: utf-8

import npyscreen
class TestApp(npyscreen.NPSApp):
    def main(self):
        # These lines create the form and populate it with widgets.
        # A fairly complex screen in only 8 or so lines of code - a line for each control.
        F  = npyscreen.Form(name = "Welcome to Npyscreen",)
        t  = F.add(npyscreen.TitleText, name = "Text:",)
        fn = F.add(npyscreen.TitleFilename, name = "Filename:")
        fn2 = F.add(npyscreen.TitleFilenameCombo, name="Filename2:")
        dt = F.add(npyscreen.TitleDateCombo, name = "Date:")
        s  = F.add(npyscreen.TitleSlider, out_of=12, name = "Slider")
        ml = F.add(npyscreen.MultiLineEdit,
               value = """try typing here!\nMutiline text, press ^R to reformat.\n""",
               max_height=5, rely=9)
        ms = F.add(npyscreen.TitleSelectOne, max_height=4, value = [1,], name="Pick One",
                values = ["Option1","Option2","Option3"], scroll_exit=True)
        ms2= F.add(npyscreen.TitleMultiSelect, max_height =-2, value = [1,], name="Pick Several",
                values = ["Option1","Option2","Option3"], scroll_exit=True)

        # This lets the user interact with the Form.
        F.edit()

        print(ms.get_selected_objects())

if __name__ == "__main__":
    App = TestApp()
    App.run()
+1

GitHub , , , " https://github.com/rigordo959/tsWxGTUI_PyVx_Repository".

Python 2x 3x, GUI .

Your application programs can be programmed using a subset of character mode in the high level GUI "wxPython" GUI. It supports keyboard and mouse displays and various terminal emulators, including color xterms (8-color with 64-color pairs and 16-color with 256-color pairs) and non-color vt100 / vt220.

0
source

All Articles