Python Forum
Tips for CLI program with Keybinding system
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tips for CLI program with Keybinding system
#1
Hello.
I want to create a simple command line program that prints text in a screen according to a 1 or 2 keystroke sequence.

The basic structure I have in mind is having the definitions of the keybindgs in two separate files, the "default" and the "user" (which overrides the default). The keybinds should be verbose in a dict-like structure, so it is easily modified by the user. (like sublime's text way of handling it)

>> What I want is some recommendations on where to start:

1) Is there some specific set of libraries/packages suitable for this task?
2) Is there some open-source project that implements this, that I could have a look on?
3) Is there a good manual/tutorial that covers this feature?

Thanks,
Pedro Pessoa
Reply
#2
It sounds like you want the curses library. Other than that, if I were you I'd just dive in and ask any questions here (ideally with the minimal code to reproduce the issue :) ).
Reply
#3
You could have a look at urwid which should be much more friendly than curses.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Any tips to how to find out values? nevlindan 1 717 Apr-27-2023, 09:14 PM
Last Post: deanhystad
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,615 Jan-11-2021, 06:30 PM
Last Post: ykumar34
Question Difference between Python's os.system and Perl's system command Agile741 13 6,807 Dec-02-2019, 04:41 PM
Last Post: Agile741
  coding improvement tips vaisesumit29 1 1,804 Mar-10-2019, 05:09 PM
Last Post: stullis
  indentation tips Pedroski55 4 3,240 Sep-16-2018, 10:21 AM
Last Post: Gribouillis
  Organizing tips Demini 1 2,207 Feb-10-2018, 05:32 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020