Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)
Can anyone tell me how to run a Python file in CMD?

1 Answer

0 votes
by (108k points)

For running a Python file in CMD (the command prompt), first of all, you should open your command prompt and write:

C:\Python27\Python.exe (paste your path of the Python file that you want to execute)

Then, you have to hit Enter. This way, your Python file will get executed.

If you are looking for an online course to learn Python, I recommend this Python Online Course program by Intellipaat.

Related questions

0 votes
1 answer
asked Jul 11, 2020 in Python by ashely (50.2k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 13, 2020 in Python by ashely (50.2k points)
0 votes
1 answer
asked Jul 11, 2020 in Python by ashely (50.2k points)

Browse Categories

...