All language subtitles for 009 Running Python Scripts using the Command Line_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French Download
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Hi, and welcome back.

In this video, I'd like to show you another way to execute Python scripts, and that's using the terminal

or the command line.

This is especially useful when you connect to a remote machine or server using, for example, SSH and

run the python script on that machine.

You don't have access to a graphical environment to open python idle or pitch time to execute the script.

In fact, in this case, this is the only way to execute the script.

Let's create a Python script using any editor like Notepad or even Pixar.

You can use any other editor you like.

I'll write some Python instructions inside the script and the save it on the desktop.

Name equals.

Entry in a single coax and print.

Hello.

My name.

I'm saving the script on my desktop is my script to that PI.

This is the script.

Now I'll open cmd dot xy or a command prompt.

Go to desktop.

Check the content of the current directory by running the command.

In the run Python.

And the name of the script.

And you see how the script has been executed.

If you use Linux or Mac, open the Linux or the Mac terminal instead of CMD, ATX C and run Python three

instead of Python.

If you are not in the same directory as the Python script, you must use a valid, absolute or a relative

path.

Otherwise you'll get an error.

For example, I'm moving to the parent directory.

If I try to execute the script by running the same command.

So Python and the name of the script, I'll get an error.

That's not a valid path to the Python script.

No such file or directory.

Now I'm running the script using the correct path.

So Python, they stop with a capital D.

Slash or backslash.

You can use either of them.

And the name of the script.

My script to that pi.

Index.

Okay.

The script was run successfully.

Great.

In this lecture you've learnt how to run Python scripts directly in the terminal.

This is useful when you want to run a Python script on a machine without a graphical environment such

as a server or on a computer without PI charm or other ID installed.

Of course python should be installed on that machine.

With this video we have completed the first section of the course on set up the programming environment.

So next we are going to have a quick quiz just to make sure that you've deeply understood how to run

your Python scripts.

Good luck with the quiz and I'll see you in the next section where we'll talk about Python basics,

such as variables, comics built in data types, operators and many more.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.