Hello again. This is yet another lecture for Mac users and in this s lecture I'm going
to show you how to set up for the Atom editor on a Mac computer so if you're a
Windows user please skip this lecture. Atom is quite an advanced editor but if
you have your favorite editor by now you can go ahead and use that editor so
that's perfectly fine. If you choose to Look, to have a look at the Atom editor
then please follow this lecture. First of all you're going to have to
download Atom. Simply search for Atom editor and then go to its website which
Atom.io, download for Mac and so while you wait for the download this
is how the Atom editor will look like so like that and so the download has finished
on my end and you can go and click Atom. Click open and basically Atom
has been downloaded and has been installed so you've got a welcome guide
in here, you can close that. This is an empty file. I'm going to close it as
well and let me close Atom and try to show you how to actually open it from
Scratch, so how to start Adam from the beginning and so let's see how to create
a program and execute a program with Atom and now you want to launch Atom
and then go to view, developer open in dev mode and that
will ask you for the directory that you want to open, so go to the desktop, go to
the folder where you have your programs or the folder where you want to create
your programs if you haven't created any program yet and click open.
And so you get this tree view in here and close that and double-clicking a file will open the
file here in the editor and so you can go ahead and add more code there.
Three plus four, you can also create other files, so you right click on
the main directory, go to new file, Myprogram2.py. Let's say print
five this time and ctrl s to save and so you have two programs now in here and you
can switch through different files by clicking the tabs in here. So how to
execute this programs now? Well you can use your Mac terminal just as you did in
the previous lecture or even better you can go ahead and install a
package, so go two packages settings view, open, go to install.
Type platformio ide, so dash ide dash terminal. Enter to search and then go
ahead and install the platformio ide
platformio ide terminal has been installed successfully, so you can go ahead
and close settings and you'll see a plus icon in here. If you click that
an embedded terminal will open in Atom editor and you can drag it down and up
to resize it. If you see closely you'll notice that the terminal is open in the
current folder, see so untitled folder this one in here and that means you can go
ahead and use Python now, Python 3 and execute a program, my program, my temp
program.py and that will print hello. Actually it was supposed to print
hello and then 7 but maybe I didn't save the script, so click on the editor
here, ctrl s to save and then click on the terminal again press the upper arrow
key to call a previously executed command and execute and you get hello
and 7 and yeah this is how to use the Atom editor. Now this is good
because you have both, you have the directory tree here with your files, with
your Python files and you have the editor here and you also have an
embedded terminal, so I hope you like Atom and from now on I'll be using
Windows, but things will be exactly the same because Python is a cross-platform
so which means the code is exactly the same on Mac, and Windows, and Linux as
well so just follow me and I hope you succeed with Python. I'll talk to you
in the next lecture.