[no audio]
Friends here we are going to see
how to install Atom Editor, and after
that we are going to see how to use your Atom Editor to run
your Python scripts.
Friends, first of all as an automation engineer, you should be good
with your command line to use your Python.
I mean to write your Python script you have to use 'VI' or
'VIM' editor, and then you have to run your script
from command line itself.
But anyway, you have some GUI editors to write your Python scripts,
and to run your Python scripts.
Right. See the advantage with any GUI editor is,
you can write your code, and then you can run such that the
code and the output you can see in a single window.
That is the advantage with your GUI editors. That's it.
Fine. Now, here we are going to see how to install your
Atom editor first. Guys
nothing is there. It's very simple. Just open your browser,
and then enter 'atom.io', then enter,
[no audio]
then directly you are going to redirect into a page where
you can see 'Download' option for your Windows 64-bit, or the
64-bit Windows 7 or later.
Just click on this. Right.
So to download this it will take some time, and you are going
to download '.exe' file.
So first you have to save this file.
I'm going to cancel it because already I downloaded that file.
You just download this.
Then let me open my 'Download' folder. There
I have already my 'AtomSetup-x64', 64
bit server, right. Fine.
So guys, now what you have to do is just double click on this,
right, so it is going to set up, or it is going to install
this Atom on your server, on your PC, right.
It will take some time.
You have to wait some time to complete this set up, right.
So up to that I am going to mute, once it is done,
then we'll go with the further steps. Please wait. And meanwhile
you just try to do your installation simultaneously on your server.
Right. Fine.
[no audio]
So it will take some time to do setup, to install your Atom.
You have to wait.
It's starting. Right. The progress you can see on your taskbar, right.
"Atom is being installed.
It will launch once it is done".
So once if your Atom is installed, automatically it will
launch that Atom editor, right. Fine.
So guys, I'm going to mute. Just observe that. It will take some time.
[no audio]
It will take almost two minutes guys.
You have to wait for that.
[no audio]
So meanwhile you just download your Atom from your
'atom.io'
website, then try to install. Right. See guys to install your Atom,
right, just I'm going to give steps.
Anyway, the process is going on.
[no audio]
First open your browser, right?
[no audio]
Then enter URL, that is 'atom.io', then there you will
have a 'Download' option,
[no audio]
just download that,
download Atom, right? It is a
[no audio]
'.exe' set up.
Once it is downloaded, right, then double click on that,
[no audio]
and wait some time.
Because it will take some time to do that setup, right?
Let me see the progress. Still it is taking some time.
[no audio]
Friends, you have a lot of GUI editors like
Sublime Text, PyCharm, Atom,
right, you can use any one of the editor.
So most of the cases I will use Sublime Text, but it is a
licensed one but Atom is the open source, you can directly
download and install. But whereas in Sublime you can download
and install, but you need a license to activate full version
of your Sublime text.
That's why please don't go with Sublime Text, but of course,
I am going to use that. But please try to do, please try to
use Atom
in case if you want GUI editors.
Of course, you're also having PyCharm as well. That is also good one.
You can use pycharm as well.
Right. Fine.
Your installation is done.
Now it is going to open your Atom editor.
It will automatically open, you just wait some time.
[no audio]
That's it.
[no audio]
Okay. Fine.
See guys, once it is open, right, go to 'File',
[no audio]
go to your 'File',
and here we have 'Settings'. Where it is? 'Settings',
now in 'Settings' you have somewhere 'Themes', suppose if I select
a 'Theme', see that you have different options 'UI Theme', that
means this entire Window theme, you can change it for your
different themes. Suppose
I am going to take 'One Light',
see that, but I don't want to use this theme. Just use default
theme, that's a good one.
But if you want you can take anything.
[no audio]
'Atom Dark'. That's it.
And then let me close all of these editors as of now, then
let me open 'New File', or you can directly, if you click here, yeah,
it is opening, right?
So let me write some simple Python script, just simply I'm
writing 'print(
[no audio]
"Welcome to Atom GUI editor")'
Right. And then save. While saving, please, please mention
'.py' extension.
So I am writing suppose 'demo.py'. Sorry, it is there. No problem.
I want to replace that. Fine. Now see that you are getting
some color for your Python script.
Now, if you want to change this editor theme, nothing is there. Again
just go with your 'File', then 'Settings', and then 'Themes'.
So here you have 'Syntax Theme'.
You can select here different theme.
Let me apply 'Base64 Tomorrow Light', right. Now open your file.
See now you have a different theme here,
[no audio]
but if you want to use default you can use it, or if you want
to change any other one,
let me take 'Settings',
so I'm going to take suppose this one,
[no audio]
now see here. That's it.
Okay. Fine. Guys, after saving your code
if you want to run your Python script just press 'Ctrl + Shift + B',
but as of now it is not running.
The reason is automatically your Atom editor, right,
yeah, now you got it, "Welcome to Atom GUI editor".
So you got this because already I have previous configuration
details, that's why you are getting this. Let me show you
that, 'Settings'. 'Settings',
then go with the 'Install', right?
So here search a package called 'script'.
[no audio]
See that. Already it was there with my host, that's why automatically
your Atom fetched that. So if you search with 'script', you will
get this script, "Run code in Atom!", and then you will see
here option like this one, 'Install', right.
But I already installed that, that's why it is able to show
that - 'Settings', 'Uninstall', and 'Disable'. Right. Suppose if I disable
this, that means assume that there is no 'script' package with
my Atom editor right. Now,
if I try to run, see that, you won't get any output now. Your
script can't run.
[no audio]
So not only for your Python, if you want to run any type of
script which was supported by your Atom, to run that script,
first of all you need to install a package called 'script'.
So just select 'Install', and then come here
search for a 'script' package.
Right. See already it was there with my host,
that's why I just I'm enabling, 'Enable'.
If it is not there, you'll get option like 'Install'. You have to install it.
It will take some time guys. Nearly two to three minutes you
will take to install your 'script' package.
So what is the use of this package means, this package will
automatically identify the Python version which is there
on your operating system, whatever the Python version you
install on your operating system,
that Python will be set for your Atom editor to run your
Python scripts.
Your Atom editor is going to identify your Python based on
your environment variables.
If you remember while installing our Python, we set some environment
variable or path for your PC by selecting 'Properties', 'Advanced
System Settings', then in any 'Environment Variables' we have
a 'Path', edit it. See that, Python 37 version was selected for
your operating system. The same Python will be used
by your Atom editor with the help of 'script' package.
Nothing is there guys. Once if you install your Atom, simply go to 'File',
then 'Settings', and then go to 'Install', and then search a package
called 'script', and then it will display a 'script' package, something
like this - 'script', some version, 'Run code in Atom!',
just 'Install' that. Right.
So after that, just select your Python script by clicking
on your editor, then press on your keyboard 'Ctrl' + 'Shift', and then 'B'.
Now it is going to run. See the output in the below.
You're getting your output here.
Right. So what is the Python version this Atom editor is using? So
as of now, I don't know about modules, right?
There is a module called 'sys' with your Python, using that
you are able to find out the version of your Python which is
running your python code.
[no audio]
Right. Let me run it, 'Ctrl + Shift + B'
See the output, 3.7.0. In case if you modify, if you modify
your 'PATH' to some other version of your Python here, automatically
that Python will be used by your Atom editor. That's it.
Right. Fine.
So after installing your 'script', after testing your Python
script whether it is running successfully or not, just close it.
[no audio]
Right. See guys,
once if you install your Python you may get some shortcut for
your Atom editor on your Desktop,
if it is not, just click your 'Start',
so see here, you will see some 'Atom' editor,
just click on that,
then it will open your Atom editor, right?
You're going to open your Atom editor.
Yes, it's opening.
[no audio]
Right. So suppose if you've already some Python scripts, and if you
want to run those Python scripts using your Atom editor, you
have an option called 'File',
just select your folder,
'Open Folder', select that. In which location you have your Python
scripts? Let me go with one of the location.
[no audio]
Sorry, let me select.
[no audio]
Let me select 'Day 3'. That's it.
Now inside that in case if you have any Python scripts, all those
scripts are going to open here. Now directly what you will
do? See that let me select some of the Python script called
suppose this one, just double-click on that,
you're going to get your python script here, then click there,
and then 'Ctrl + Shift + B'. Right. Now you are going to get
your output here.
[no audio]
See that,
'Invalid syntax'.
Yeah, maybe this is Python 3, right?
I am using maybe Python 3, 13th line, yeah.
So here I need a parentheses here. Save it and then run it,
'Ctrl + Shift + B'
Yes, you got your output, right? That's it.
So guys after installing your Atom editor
what is your next step is, if you want to change some things
you can change it, but no need of that. Directly
you can use default themes, then install 'script' package
on your Atom.
So how to install this?
If you install this, then only your host Python software will
be identified by your Atom, and the code in your Atom will
be run by that Python software in your Atom editor.
So to install 'script' package, right, package name is simply
'script' guys, what you have to do is,
go to
your, see that, 'File',
[no audio]
then select 'Settings',
then in that select 'Install', then you
will get a search bar, so search with 'script', then you will get
a 'script' package.
[no audio]
So there you have an option called 'Install', just install it.
That's it.
Then after that you just to close your Atom, and then reopen
right? So one more thing, once if you install your Atom editor,
right, automatically you may get shortcut of your Atom on your
Desktop. If not, no problem,
just select your 'Start', and then click here so that it will
open your Atom editor. That's it.
[no audio]
So guys, going forward
I may use most of the cases Sublime Text because for
presentation purpose that is good.
Right. But you can practice your course using your Atom.
Right. And also try to write the code using 'VI', or
'VIM' editor, and try to run your code from command line as well.
Right. If you are looking for automation engineer, that is the
best option actually.
For application development, something like that,
actually this GUI editors are good because for application
development, you know, you will have some number of folders,
some number of applications, each application will have some
URL, some use, some DV models,
that's why different files you have.
So maybe you're going to work at different files at a different
times, that's why it is very easy to select here
your required files with GUI editors.
Right. So anyway guys you have number of editors, just select based
on your choice, go with your required or your favorite editor,
and try to practice your Python scripts, okay.
Okay guys, thank you for watching this video.
[no audio]