[no audio]
Hi friends, in this video
we are going to see the different types of editors to write
your python code. Right.
Let me start that. See we have different types of editors,
like IDLE, vi/vim editors, Notepad/Notepad++,
PyCharm, Spyder, PyDev, Sublime Text, Atom, and so
many, right. So guys here among all your vi/vim editor
is the command line editor, and remaining all are IDLEs,
I mean remaining all are GUI editors.
Right. So guys as an Automation Engineer, right,
first of all you should be good with how to use either 'vi'
or 'vim' editors.
And you know by default, right,
you won't get 'vi' or 'vim' editors on your Windows.
But anyway you will get by default this 'vi' or 'vim' editors on
your Unix-like systems, right?
So I am going to provide the link to install 'vim' on your
Windows operating system below of this video.
We just go through that so that you can be able to install 'vim'
editor for your Windows operating systems
and anyways to install 'vim' on your Unix-like systems because
by default you will get 'vi', or on some like Ubuntu operating
systems you will also get 'vim',
right. In case if you want to install suppose on Linux
your 'vim', simply 'yum install', right, 'yum install vim'.
That's it. Very simple, right?
So based on your Unix-like systems
you have to run your command to install 'vim'.
Anyway by default you are going to get 'vi', that's fine.
Now, what is this IDLE?
So guys, IDLE means Integrated Development Environment.
See once if we install your Python on your Windows operating
systems by default this IDLE will be installed. Just go
to your 'Start' after installing your Python, and see that there
is an IDLE called Python 3.7 64-bit.
Right. If you open that,
you just click on that.
[no audio]
So it is going to open a Python Shell or Python command line.
[no audio]
Right. So I'm going to start it. Very first time it will take some time.
[no audio]
So just wait. Yeah,
it's opening. Yeah, see here.
[no audio]
So this is Python Shell, guys. Not only here, if you open simply
your Windows terminal, and there if you enter simply 'python',
you are entering into your Python terminal or Python Shell
or Python command line. Both are same.
So this is by default
you are getting some Python Shell command line by opening
your IDLE terminal, or from your Windows operating system
if you type simply 'python' you are entering into this one.
Not only here even on your Unix-like system also from command
line if you enter 'python', then you will enter into your Python Shell,
or Python command line.
So what is the purpose of this?
Nothing is there guys. If you have a Python program which consists
of suppose some 100s of lines, maybe 2 lines also,
or maybe one line also, each and every line individually
you can execute here one by one.
[no audio]
Okay, that is the purpose of your Python Shell. Now these
and this one both are same.
Right. Now from here if you open, simply if you click on 'File',
and click on 'New File', it is going to create a editor like
your Notepad.
So here you can write your Python program and you can save
it. Let me write simply something called,
[no audio]
Python 3.x,
right. Let me save this, 'Ctrl + S'. So you have to save somewhere.
I'm going to save it on my 'Desktop', simply 'demo.py', and
then go to 'Run', then 'Run Module', or directly you can use 'F5'
also in your keyboard.
So this result you are getting on your Python Shell.
This is one way. Or suppose if we have your 'vim'
editor, from command line
also you can write a Python program like 'vim'.
Let me write 'demo.py'
Right. I'm opening that 'demo.py' file, and there I am going to
write my Python program.
So already it is there somewhere. So three lines of code
is there, right. So let me run this.
So simply to run your Python programs,
'python demo.py', that's it.
So if you observe, I'm having three lines of code here. Now
these three lines of code
I can run from my Python Shell as well.
Let me take first line, and copy and paste it, and execute
it. Yes, you are getting output. Now
let me take second line.
[no audio]
So initially in case if you want to practice line-by-line,
you can go and open this Python Shell, and
you can practice your code.
[no audio]
Right. So guys you can go with your IDLE, and from there
you can go with 'File', and you can create a 'New File'.
Not this, right. You have this one Python Shell, click here
'New File', and it's like a Notepad, but you can write your
program, you can save it, and you can run simply by pressing
F5, or by clicking on 'Run Module F5', 'Run Module'.
Right. So guys my suggestion is no need to use this one.
Don't use IDLE. If you want you can use it.
But instead of that from your Windows or Linux operating
system command line, right, to create a file just use 'vi' or
'vim' editors, or to enter into your Python Shell just type on your
Windows or Unix like system simply 'python', and you will enter
into your Python Shell, and there you can execute your line by line.
Right. Fine.
So guys, now we are okay with IDLE, vi/vim. Anyway by default
you have Notepad/Notepad++. You can write your
program and save your Python program with an extension of
'.py', and you can run your program by entering into your
command line and by passing 'python ', program name.
Anyway this is not suggested way, right. Then
you can also use PyCharm, right or Spyder or PyDoc, Atom,
and Sublime Text.
[no audio]
Right. So first thing guys, remember that as an Automation Engineer,
you should be good with either 'vi' or 'vim editors
because they are from command line,
right. Then second thing, if you want to use you can use IDLE
as a GUI editor, but instead of that while practicing, because
in your real time you may or may not have this PyCharm or
any one of these GUI editors,
definitely you have Notepad++, right,
but anyway in your real-time, right,
this is the chance to have as an editor in your real time,
and that's why just try to use this 'vi' or 'vim'. In case for
your practice, right, you can use either PyCharm or Sublime
Text. So in the next video, I will show you how to install
either PyCharm or Sublime Text, right?
And for these, guys if you want to use 'vim'
editor on your Windows operating system by default you
don't have, so I am going to post the link to install 'vim'
on your Windows operating system.
You just go through that link so that you can be able to install
your 'vim' on your Windows operating system, right?
Okay, guys, we will see next video how to install PyCharm
or Sublime Text.
Thank you for watching this video.
[no audio]