How to run a Python Script from your Command Line or CMD

Published: 19 December 2018
on channel: ComputerGuyChris
1,676
18

Sometimes, getting started can be the hardest part of learning to program, even in python. Just running your code can sometimes be a challenge. In this video, I will be showing all of you how I like to run my python scripts using the cmd command line. The cmd command line is useful when you want to run your code separate from your IDE.

To open the cmd, you can press the windows key and then type 'cmd'. Also, you can open up the file location in file explorer, navigate to the python file, and then type 'cmd' in location portion. This will open a cmd command line with the same starting directory as the python file.

There are many different ways to run python scripts, some IDEs will even run the script in the IDE with some simple keyboard commands. This video is a tutorial on how to run a Python script from your command line or cmd. This can be useful in many situations but I use it when I have user inputs within my code.

If you have any questions, leave a comment in the comment section.
Please remember to like the video and subscribe to the channel!
Enjoy!


On this page of the site you can watch the video online How to run a Python Script from your Command Line or CMD with a duration of hours minute second in good quality, which was uploaded by the user ComputerGuyChris 19 December 2018, share the link with friends and acquaintances, this video has already been watched 1,676 times on youtube and it was liked by 18 viewers. Enjoy your viewing!