Python and exit codes

preview_player
Показать описание
What is an "exit code," and why do you sometimes see that a Python program had "exit code 0"? In this video, I explain what they are, show you how to grab the exit code from the Unix shell, and also demonstrate how to set the exit code from your own Python program.

Рекомендации по теме
Комментарии
Автор

btw if you searched this up just wanting to know how to end ur code when a certain input is given just put sys.exit()

lennoxwaugh
Автор

It would be really nice to see your Python book come out one day! Great video sir.

TitanV
Автор

Hi sir! I’ve been tring to run my code, but even when i have the most basic code such as print(“hello”) the only thing that comes up is the /users/ long code and the process fiished with exit code 0. I don’t know what to do and can’t find anything to fix it. Could you (or anyone who sees this and knows )help please 😊 Thank you!!

boum
Автор

I faced a problem when I write a code string=" hello world " the Python close after pressing the run why did that happen??

deborshikashyap
Автор

Hey, I’m getting exit code 137. I looked it up and people said it’s a memory issue but my MacBook had 8g ram and I’m only using 4g currently. Thanks!

taggs
Автор

Sir i have a doubt
For normal cases we use 'sys.exit(0)' for exiting the program
But what if we use 'sys.exit(-1)' or any other other integer except 0.what does it mean?

dhanishthakapoor
Автор

In Python idel too?? I made a backward jump under a condition. That works but if the condition is false, i placed "exit()" in "else:" there...but it doesn't exit and starts my program from beginning [coz i placed def restart(): to jump] ... So im stucked there...

pritnadoda
Автор

when i type my code en try to run its only giving that message "Process finished with exit code 0 " without any output

wisemaster
Автор

The basic question is what to do if you get exit 0 but it does not run the program. Can you answer that question?

mimiklimberg
Автор

Hello sir i get all day i making any github fork it's says process comleted with exit code 1 im New and dont know Python I've been getting this error for 1 month, if you could help me I would be very grateful

sndromedi
Автор

hello sir! I am getting exit code 1 whenever i try to open jupiter notebook through anaconda what should i do?

nazratabbas
Автор

Hello! What is exit code 2? Please, I need help...

nathalialuizaneumann
Автор

sir,i have a question, can you receive my pic, i wanna show you cuz i cant really fix it. And i found no similar question on google

xinruidong
Автор

It works fine after deleted the current file and created a new file..

deborshikashyap