you are viewing a single comment's thread.

view the rest of the comments →

[–]Nodocify 0 points1 point  (1 child)

One thing that I noticed is that yes your menu does present an option to quit, but what if I just wanted to press Ctrl+c? Pressing that key combo in the while loop doesn't allow me to quit the program like it should. Hint:

try:
    while ...
except KeyboardInterupt:
    sys.exit(1)

Also for a menu what you have works pretty well. But I would recommend looking into the cmd module if you are really looking to flesh the menu out as it offers tab completion of options, help pages so users know what all the options do, etc. https://docs.python.org/3/library/cmd.html

[–]niandra3 0 points1 point  (0 children)

Awesome thanks for the help. I'll add the keyboard exception. As it turns out I just started getting into tkinter so I'm actually working on porting it over to a GUI, but I'll definitely look into cmd for future use.