Python Forum
Using break to exit a loop help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using break to exit a loop help
#4
I have never used Mac but one way is to make the script executable. So you just cd /to_directory and run ./the_script. In order to do that the shebang line must be placed on top of the script: #!/usr /bin/env python3. This is for Linux and I am not sure if it will be the same for the Mac OS.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
Using break to exit a loop help - by JJG - Dec-08-2017, 10:49 PM
RE: Using break to exit a loop help - by wavic - Dec-08-2017, 10:59 PM
RE: Using break to exit a loop help - by JJG - Dec-09-2017, 01:50 AM
RE: Using break to exit a loop help - by wavic - Dec-09-2017, 02:30 AM
RE: Using break to exit a loop help - by JJG - Dec-09-2017, 03:02 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  python difference between sys.exit and exit() mg24 1 1,962 Nov-12-2022, 01:37 PM
Last Post: deanhystad
  Code won't break While loop or go back to the input? MrKnd94 2 1,078 Oct-26-2022, 10:10 AM
Last Post: Larz60+
  How to break out of a for loop on button press? philipbergwerf 6 1,905 Oct-06-2022, 03:12 PM
Last Post: philipbergwerf
  break out of for loop? User3000 3 1,546 May-17-2022, 10:18 AM
Last Post: User3000
  Asyncio: Queue consumer gets out of while loop without break. Where exactly and how? saavedra29 2 2,797 Feb-07-2022, 07:24 PM
Last Post: saavedra29
  While loop doesn't exit KenHorse 3 2,094 Jun-20-2021, 11:05 PM
Last Post: deanhystad
  tkinter control break a while loop samtal 0 2,471 Apr-29-2021, 08:26 AM
Last Post: samtal
  Cannot 'break' from a "for" loop in a right place tester_V 9 4,142 Feb-17-2021, 01:03 AM
Last Post: tester_V
  How to break a loop in this case? Blainexi 10 7,490 Sep-24-2020, 04:06 PM
Last Post: Blainexi
  Exit Function - loop Tetsuo30 2 2,142 Sep-17-2020, 09:58 AM
Last Post: Tetsuo30

Forum Jump:

User Panel Messages

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