Skip to player
Skip to main content
Search
Connect
Watch fullscreen
Like
Bookmark
Share
More
Add to Playlist
Report
Run Python Script
TestingDocs
Follow
1 year ago
Run Python Script
Category
📚
Learning
Transcript
Display full video transcript
00:00
In this lesson, you learned how to run Python scripts.
00:08
In the earlier lesson, we have learned that executing a single Python command or statement
00:16
using a Python interactive interpreter.
00:20
However, in this lesson, you will learn how to execute multiple Python statements using
00:30
a Python script file.
00:32
A Python script file can contain multiple Python commands or code statements, usually
00:38
created using a text editor like Notepad or Notepad++ or using an IDE tool like Eclipse
00:47
or IntelliJ.
00:50
In this lesson, we will use Notepad++.
00:54
So open the text editor and enter some sample Python code statements, let's say, hello user.
01:17
We'll just add this three times, save the file, just save it in the desktop location
01:32
and the script file extension should be .py, python script.py, save and close within double
01:53
quotes.
01:54
Click on save to save the script file.
01:59
This is how the text editor highlighted the commands, Python command print, okay.
02:08
Once you are done with the script file, open the command line form, go to the script location,
02:23
so cd stop, okay.
02:31
So this is the Python script file that we have created.
02:38
So to run the Python script, enter the command Python and specify the script file.
02:47
Notice that the script file has run and you can see all the three statements got executed.
03:00
In the next lesson, we'll learn how to execute the Python script using an IDE tool like Eclipse.
03:07
Okay, thank you.
Be the first to comment
Add your comment
Recommended
2:20
|
Up next
Flowgorithm Hello World Flowchart
TestingDocs
1 year ago
1:33
Selenium IDE Install on Firefox
TestingDocs
1 year ago
5:22
Types of Flowgorithm Functions
TestingDocs
1 year ago
3:45
Python Install on Windows
TestingDocs
1 year ago
4:32
Area of Circle Flowgorithm Flowchart
TestingDocs
1 year ago
0:50
Generate Java Code from Flowgorithm Flowchart
TestingDocs
1 year ago
2:24
Python Interactive Interpreter
TestingDocs
1 year ago
7:45
HelloWorld Java Program Step-to-Step Guide
TestingDocs
9 years ago
4:10
Python Package Manager
TestingDocs
1 year ago
2:50
Java Install on Windows
TestingDocs
1 year ago
0:51
Former Aide Claims She Was Asked to Make a ‘Hit List’ For Trump
Veuer
2 years ago
1:08
Musk’s X Is ‘the Platform With the Largest Ratio of Misinformation or Disinformation’ Amongst All Social Media Platforms
Veuer
2 years ago
4:50
59 companies that are changing the world: From Tesla to Chobani
Fortune
2 years ago
0:46
3 Things to Know About Coco Gauff's Parents
People
2 years ago
0:35
8 Things to Do in the Morning to Improve Productivity
Martha Stewart Living
2 years ago
1:18
USC vs. Colorado: Can Caleb Williams Earn a New Heisman Moment?
SportsGrid
2 years ago
1:04
Vic Mensa Reveals Celebrity Crush, Biggest Dating Pet Peeve & More on Speed Dating | Billboard News
Billboard
2 years ago
1:09
Hollywood Writers Reach ‘Tentative Agreement’ With Studios After 146 Day Strike
Veuer
2 years ago
1:26
Love is Blind stars admit they're burnt out from social media
Fortune
2 years ago
2:01
NHA Customers in Limbo as Company Faces Potential Merger
SportsGrid
2 years ago
2:55
Vanilla Ice Explains How the 90’s Shaped America
FACTZ
2 years ago
0:36
Amazon’ Prime Video Will Show Commercials Starting Next Year
Veuer
2 years ago
11:13
Pokimane Answers The Web's Most Searched Questions
WIRED
2 years ago
4:16
BREAKING NEWS: Matt Gaetz Tells House Committee: 'I'm Not Going To Vote For A Continuing Resolution'
Forbes Breaking News
2 years ago
1:00
What's Popular on Uber Eats?
Stringr
2 years ago
Be the first to comment