Python: How To Prevent The CMD Window From Closing

preview_player
Показать описание
Hey guys here is one of my first python tutorials! I'm not making this a series so It's basically if you have a little problem and you look it up, I will quickly tell you how to fix your problem. If you guys have any problems or questions let me know and I will make a video on it. Today I'm going you how to prevent the CMD window from closingwhen you open it!
Рекомендации по теме
Комментарии
Автор

its shocking that there's no comment since 8 years

hereforyou
Автор

Your video from 8 years ago helped me today brother. Thanks mucho

belalahmad
Автор

instead of writing 'print ()' like 10 times use '\n'

tango
Автор

My code has it that if you type something it will print but when I press enter it closes so how do I input things instead of pressing enter

stink-man
Автор

"print ("hello")"  and "print ("hello") input()" are two different programs.
In the first program you are printing hello on the screen, in the second program you are printing hello on the screen and want an input from user. By that difference, command prompt wait for a response and after the response closes immediately. Because of this your solution is not valid for command prompt issue.
I am searching an answer for this issue about two days and i think the problem is about windows command prompt settings.
By the way this is the default behavior of command prompt.

tanhauser
Автор

do i have to write that on every single file? that'd be stupid

mauricemorty
Автор

Also there’s another way that’s close but it’s

(Anything here) = str(input(“press enter to exit: “)

Str can be replaced with int

nopfp
Автор

Lmao this was so simple and yet sooo useful. Thanks a lot sensei🌹

sagnik
Автор

Thank you so much this is really helpful!

aidanc
Автор

Thanks
A like after eight years
Reply toe if u r here

alaaroumeeh
Автор

poeple stop disliking him hes helpful:)

mrrage
Автор

OMG Thank you soooo much. my problem is solved now!

ay-at
Автор

Thanks bro, you save alot time and frustration

kennethsmith
Автор

windows 8.1 I'm using, command prompt automatically open (blah blah)how to avoid

ManuNt
Автор

Im gonna sub to u cuz this helped me by a lot

xThePHINIXx
Автор

Thank you very much for this tutorial. appreciate it. :)  

spartaspice
Автор

It still does not work on mine, I am using Windows 8.1`s CMD.

HikikomoriDev
Автор

Thx man ! You saved my time✌️✌️✌️✌️🤘🤘🤘

opkp
Автор

every time i open this bat file, cmd opens for a second then auto closes how do i fix this

unknown
Автор

Hey this propmt command appears to me evrytime i connect the AC adaptor and after 5 secs it turns off automatically.. what can I do?

hauntedmusicartofficial