Configuring Your Atom Editor to Work With Python

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back everybody this is hundred visions guy and on this video tutorial possibly a series or a playlist I want to talk about configuring the atom hackable text editor for python programming and this is an editor that you can install on multiple platforms so it's not just tied into Windows and it's Windows Mac Linux and so it's a hackable text editor which means it has all kinds of features that you can expand upon and there's already a bunch that are great to you so I'm going to just kind of go through getting a system set up for doing atom and Python programming now down below over here I have pythons that a Python file using the old idle editor so here's idle on Windows and there's the shell now let's say I create a program and I go to save that program and I have so I good let's just add one here it's going to call it test hi now if I run it in here what will happen is I'm going to get in there and I see the syntax error unexpected AOS while parsing alright and I immediately know there's an error there okay so by default a text editor is not this is actually considered an IDE an integrated development environment so very much a sort of basic one it does not have a lot of whistles and bells like you might see but it has things like a debug option where you can debug your program so there are some features that you want to have and so if you just get the atom editor in and of itself and you go and you save the file here and then you go to save it so we're just going to save it next to the other one just so you can sort of compare and we'll call this test two dot py let's say my changes now at this point to run it there's nothing I can do from here I actually have to go into the folder find where that file is which you guys now I got to go open it up because I don't think I have it in a folder I'm just going to right click on here now I can show and Explorer and I can double-click it but if you notice it opened and then it just killed itself it just crashed but I got no message I have no air I don't know what went wrong so this is not going to be a good setup if you don't have any of the features that Idol has so what we're going to do is we're going to download all the features you would want for Python programming using the atom editor and in order to do that we're going to need to install some packages and do a little bit of configuration we're going to go ahead and install a package we're going to click open installer the first thing we're going to look up is Python because that's what we're dealing with here okay autocomplete Python language python it looks like language is already on here there's also a Python tools and types on in debt we got all kinds of things in here python debugger okay so we're going to take a look at some of the ones that are going to help you with programming now I have to give you this disclaimer this is one of my students I'm using one of my students computer I'm on his account because I want to just make sure this is something my students can do we're going to go ahead and try to install autocomplete and hopefully there will not be any issues with that I'm going to let this run and then I'll come back when it's done okay as soon as I've done it has enabled height or enable local inches those are going to try the enable local engine and see what happens and then if you want to improve at them you can anonymously send usage that's up to you I'm just going to go ahead and be a nice guy play well with others and go ahead and do that okay so that was autocomplete let's see what happens now if I go into a Python file ah look at that so right away it gives me some suggestions so watch I type I and then I can hit enter right there and then it gives me suggestions as to what I can put inside and now notice the error I had before was because I didn't close the parentheses well autocomplete did that for me right so now I got that far I get autocomplete that's going to help me solve a lot of programming problems right then and there let's go back to the Installer and see what other items we can install and add to this program while you still have the welcome guide guide just click open Installer and python is still here so we have autocomplete Python alright let's see what else we have we're going to try the atom Python run I'm going to scroll down and let's install that now one of the things you may want to do while you're installing or before you install even sometimes it's better is to click on the link up there and then it will open up the information on the website about it so sometimes it'll tell you things like keyboard shortcuts alright so this is a debugger package I thought I clicked on a different one well let's just go ahead and do that so we're going to go back to here and oh I click Python debugger I meant to click atom Python run but let's just go ahead and do the debugger anyway and let's go ahead and set a variable let's write a function okay I coded out some code and got a print and I got a function called insult and then I call the function here and at this point we can't really run it right here so let's get let's go ahead and get the other package installed and then we'll test this particular the debugger after so we'll go back and it's the Python run there we go we'll install python run it's already installed did not take long at all we'll go ahead and take a look at the usage on the website it lets us take a look at it run it run your Python source file using f5 well that's easy I know how to do that so I go over here this is what we do in Python anyway so I'm going to type f5 so let's see it run there we go alright we got an error now so we've already made progress in the running again a chance to see any errors that we happen to have and so now we get to test the debugger okay now I'm going to hold down alt type our there's debugger I can click run all right drive f5 to run now it already cancel that okay let me sorry I'm going to do this again okay so you click run and then it starts showing you the lines that it does and then you're going to want to click Next on each one to see how it goes one of the things you can notice is you'll notice that the lines are getting highlighted as we run it so as we click Next we're now calling the function let me click Next and now we're in the middle of running it and that's what we have the error so it sort of walks through as you click Next it just keeps cycling through the program step by step I just realized that the debugger is not as good as I thought it would be if you let's go back to the website on here and one of the things is if you look at the bottom you will see that they don't do any watched variables or expressions I prefer that at a debugger I like to be able to watch a video and see what the value is at a certain point so I don't think this is as good of a tool as I would want so I really wanted to do debugging I might do a different way I will say you can add a breakpoint using the alt shift R and then that way you can jump directly to a part of your program but I found that this is not as valuable as I thought it would be now what if you want to run Python directly inside the window here is a tool that I like Adam Runner it will run your script right inside of Adam and it works with other language is not just Python so we're going to go to Adam Runner I just did install packages and I wrote run Adam Runner install try to install this one and then we'll go back to test to Chi and we'll see how much better it is once we have the Adam Runner so we may have to configure setting but let's just see if it happens to work in here types f5 oh yeah we still have an error on here let's fix the error that's where I had the year f5 running ok they take all our off the rows control our take the debugger off Adam runner hey where I'll hey you you could like a monkey alright there we got it I'm going to close this for a little bit there's our Adam runner over here and so you see how that now you can basically run your Python code and see what it looks like in the window right there it's this one I think we have all the main tools we could want for Python and so in the future tutorials I'll show you more Python coding in the atom editor if I find any other tools that you would like [Music]
Info
Channel: hundredvisionsguy
Views: 124,690
Rating: 4.2140574 out of 5
Keywords: Atom.io, Atom editor, Python Programming
Id: AtMRdxJTmPE
Channel Id: undefined
Length: 10min 19sec (619 seconds)
Published: Wed Mar 01 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.