Python Forum
How to programmatically exit without Traceback?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to programmatically exit without Traceback?
#7
Should I be able to run from the command line?

When I ran the file.py I initially got the print lines as output. I then entered sum_two(3.5,7) and got:
Output:
'sum_two' is not recognized as an internal or external command, operable program or batch file.
(Feb-24-2021, 05:51 PM)deanhystad Wrote: Yes on the colon. When I try that in Visual Studio code the computer raps my knuckles with a ruler.

Exiting out of a program from inside a function is usually a bad idea. Do you get the same message if you run your program outside of Spyder. IDLE is my tool of choice when answering questions on the forum. Sometimes IDLE doesn't work as expected, and when that happens I try running my programs from the command prompt or from Visual Studio Code.
Reply


Messages In This Thread
RE: How to programmatically exit without Traceback? - by Mark17 - Feb-24-2021, 06:36 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question How create programmatically variables ? SpongeB0B 6 1,503 Aug-19-2023, 05:10 AM
Last Post: SpongeB0B
  How to programmatically stop a program in Jupyter Notebook? Mark17 11 38,306 Feb-12-2023, 01:41 PM
Last Post: jp21in
  Create Excel Line Chart Programmatically dee 3 1,260 Dec-30-2022, 08:44 PM
Last Post: dee
  python difference between sys.exit and exit() mg24 1 1,969 Nov-12-2022, 01:37 PM
Last Post: deanhystad
  Adding Language metadata to a PDF programmatically bhargavi22 0 1,991 Aug-17-2020, 12:53 PM
Last Post: bhargavi22

Forum Jump:

User Panel Messages

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