![]() |
Create menu with selectable items - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Create menu with selectable items (/thread-21347.html) |
Create menu with selectable items - SaladFingers - Sep-25-2019 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 RE: Create menu with selectable items - Larz60+ - Sep-26-2019 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 RE: Create menu with selectable items - SaladFingers - Sep-26-2019 (Sep-26-2019, 12:54 AM)Larz60+ Wrote: you can use this package: https://pypi.org/project/curses-menu/ Thanks Larz, that's great, I will look into this. Seems like just what I need though. RE: Create menu with selectable items - ichabod801 - Sep-26-2019 If you want something simple, I wrote a tutorial on command line interfaces that might fit the bill. RE: Create menu with selectable items - SaladFingers - Sep-28-2019 (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. |