Python Forum
Simple cli menu quits on selection
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple cli menu quits on selection
#20
O.k., here is what I think is happening. Your "clear" command to clear the screen is preventing you from actually seeing the error, it erases the screen to fast for you to see. Try commenting the "os.system('clear')" and then run your script. 

Output:
Welcome, Please choose the menu you want to start: (1) Display operating system version (2) Ping a web site (Q) Quit Enter your choice: 7 Not a correct choice: <7>,try again Welcome, Please choose the menu you want to start: (1) Display operating system version (2) Ping a web site (Q) Quit Enter your choice:
Either don't clear the screen, or add a time.sleep() after the 'print()'.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Messages In This Thread
Simple cli menu quits on selection - by pamamolf - Oct-23-2017, 06:50 PM
RE: Simple cli menu quits on selection - by sparkz_alot - Oct-26-2017, 02:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Menu Choice Selection not Working ChLenx79 5 1,632 Nov-23-2022, 05:56 AM
Last Post: deanhystad
  Menu selection using function leodavinci1990 8 14,836 Dec-05-2019, 01:48 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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