Python Tutorial for Beginners 5 - Save and Run Python files .py

preview_player
Показать описание
In this video I am going to show How to Create, Save, Run a Python .py file. This video will also give the answer to the question which is , How do I run a Python program on a terminal or without any IDE/ Editor?.

Examples:

# This will simply execute the script and return to the terminal afterwards

# The -i flag keeps the interpreter open after the script is finished running

$ python

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!

ide - How do I run a Python program?
How can i run python files .py
Python - Create, Save, Run a Python file
How to save python codes in files?
python save object to file
python save list to file
python save string to file
python save dictionary to file
python save url to file
python save json to file
python save mat file
python save file to directory
python execute exe file
convert python file to exe
python file is executable
Рекомендации по теме
Комментарии
Автор

Thanks man, simple I know but I've been wracking my head around for hours now trying to do this haha thanks!

jojoray
Автор

Great work sir ! your video series is awesome, keep going.

pragyas
Автор

Thank you, I wanted to try a bit of python and installed it via laragon local server. this kinda worked in a similar way. It didnt open the executable straight away like suggested in the video but you can guide windows to where the python.exe is to run the py files.

Overall, I run my first python file based on following this video so thank you. Now i need to learn how to install / import modules.

MarlonKingShow
Автор

I had struggled with these steps for ages before I found your video. thank you!

thanhthanhhuynh
Автор

Thank you!! As a beginner, I can say this channel is pure gold.

marcomontesdeoca
Автор

I have little previous experience and are following these pretty easy. Many thanks

Degga
Автор

you are giving good material. I'm learning.
thank you

Jalalrk
Автор

hw to hold the result in the command line screen.after writimg the program :?

Gaga
Автор

Thanks loads...It is so simple...i got it now!!!

prakritimukherjee
Автор

hey in 'save in type .py file extension is missing' what i should do when i open the saved file it flashes and disappears

Naaruhina
Автор

Is the the executable environment DOS? Really enjoying your videos, making programming enjoyable for me.

rtrgrl
Автор

how can i make it write the "max value" next to the string instead of the bottom of it.

yagzefedemirel
Автор

when i am trying to edit something in program always it shows ? mark what does it means

arpit
Автор

What is the difference in using function where ni model nane required (ex max) and few we use with model name like math.exp?

ZaidAlig
Автор

I have a prior knowledge of C++. Unlike in c++ IDE, in python we write on program in the 'new file' and then if we need to execute it, we have to save and RUN it on shell. what annoys me you can not do both together and then save it for later use. Is there any alternative? or my concept is wrong and we can actually do both together??

bushrafarhat
Автор

Thanks for this video, It's very helpful for beginners,

sageerahmad
Автор

when i double click on a python file its open in Editor, i want it directly run on terminal, i hv mac... so wht i hv to do ...?

twinklegoyal
Автор

When I save the program and reopen it the file opens up under Idle (the white screen). How do I make it so it will open up in the black screen like in the video?

michaelriedeman
Автор

Hi ProgrammingKnowledge, I really enjoy learning from you videos. However, I have a question regarding this Python Beginners 5 that I was hoping you can help me with. I am using 3.5.1 version on mac. When I double clicked on the test.py file, the IDLE GUI interface came up rather than the terminal interface. So I opened it with the Python Launcher and the terminal came up but the last command "press enter to exit" did not close the terminal. The following came up instead:
Traceback (most recent call last):
File line 8, in <module>
input("Please press enter to exit")
File "<string>", line 0
My question is, how do i get the terminal to close using your command if I am using mac?

kibting
Автор

Sir, Can i write the same codes in Pycharm ? It will run there or not ?

saumyatiwari