Python Forum
Go up script/menu(a goto command)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Go up script/menu(a goto command)
#4
(Apr-24-2017, 04:48 PM)ichabod801 Wrote: Well, generally this would all be in a loop that would go until you got a 2 (exit). Then you could have a sub-loop for sub-menus.

I would suggest having each menu loop in it's own function, that returns when the loop is over. Then you would have something like:
if menu == 1:
    math_menu()
It help organize your code.

how will that look in my code,i have just started learning and can't get where/how to use the "math_menu()" part
i just need to see it in my code as i know what does what there,i tried reading that thread but i don't understand how to apply that to my script,thanks in advance ,and sorry for being inexperienced and dumb.not good at understanding others code
Reply


Messages In This Thread
Go up script/menu(a goto command) - by foxtreat - Apr-24-2017, 04:37 PM
RE: Go up script/menu(a goto command) - by foxtreat - Apr-24-2017, 05:26 PM
RE: Go up script/menu(a goto command) - by snippsat - Apr-24-2017, 05:52 PM
RE: Go up script/menu(a goto command) - by foxtreat - Apr-24-2017, 05:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Randomly Print a Quote From a Text File When User Types a Command on Main Menu BillKochman 13 1,413 Apr-24-2024, 05:47 AM
Last Post: Bronjer
  Is possible to run the python command to call python script on linux? cuten222 6 944 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  Run CMD Command In Python Script shantanu97 2 6,634 May-13-2021, 08:08 AM
Last Post: Gribouillis
  goto jmabrito 34 10,967 Feb-18-2021, 09:55 PM
Last Post: jmabrito
  Script works when executed from command prompt but not when executed in SDP Tippex 0 2,097 Apr-07-2020, 04:26 PM
Last Post: Tippex
  How to make input goto a different line mxl671 2 2,555 Feb-04-2020, 07:12 PM
Last Post: Marbelous
  Script won't continue after command line skip671 7 5,110 Oct-15-2018, 07:37 PM
Last Post: snippsat
  Pyinstaller to execute a script in command prompt Ciroxxx 0 2,155 Sep-18-2018, 10:17 AM
Last Post: Ciroxxx
  goto problem Skaperen 1 2,820 Jan-27-2018, 01:11 PM
Last Post: stranac
  Is there a goto like there is in BASIC? Luke_Drillbrain 24 15,125 Apr-24-2017, 06:00 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