Python Forum
Create menu with selectable items
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create menu with selectable items
#1
Hi, I'm pretty new to python but enjoying learning. I have done quite a bit of searching for this but come up empty handed so have signed up here. Any help would be much appreciated.

What I would like to do it create a menu in python that you can select items and then use those items as variables. I'm sure you have seen scripts before where you get a list of options and you use spacebar to select an item/s.

What I am trying to achieve is this;

- Write a script that backs up Cisco routers to a folder by their IP address (I have completed this)
- Have a function in the script lists all of the files in a specific folder and allow you to select two of them to compare.]

Don't worry, I'm not asking how to write the whole script, I was just hoping someone could point me in the example of how to create that menu with selectable options. I don't want t use TkInter, just want it to show up in the script.

Thank you
SaladFingers
Reply
#2
you can use this package: https://pypi.org/project/curses-menu/
It's a bit old, but I installed it and it runs fine in python 3.7.4
install with:
pip install curses-menu
Reply
#3
(Sep-26-2019, 12:54 AM)Larz60+ Wrote: you can use this package: https://pypi.org/project/curses-menu/
It's a bit old, but I installed it and it runs fine in python 3.7.4
install with:
pip install curses-menu

Thanks Larz, that's great, I will look into this. Seems like just what I need though.
Reply
#4
If you want something simple, I wrote a tutorial on command line interfaces that might fit the bill.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#5
(Sep-26-2019, 12:53 PM)ichabod801 Wrote: If you want something simple, I wrote a tutorial on command line interfaces that might fit the bill.

That's great, thank you. I will check it out as well.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I create menu in Python? khagan07 1 525 Oct-07-2023, 12:44 PM
Last Post: deanhystad
  How to create a menu button? Frankduc 30 5,345 Mar-09-2022, 10:37 PM
Last Post: deanhystad
  Create a dynamic Menu from a editable Dictionary. KiNeMs 1 2,302 Jan-28-2020, 04:27 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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