 Hey, what's going on everybody? My name is John Hammond and welcome back to another YouTube video tutorial We're still looking at Python. We made a cool little thing here that actually doesn't do a whole lot But it's going over the basics conceptual stuff with input and output and variables and now we're gonna move on This time around since we're starting to get into more actual cool and important and things Programs that actually do stuff. We're gonna have to make sure our code is good We have to make sure our code is compliant with Python standards and things like that So in Python, there's this actual thing like that's called pep8 It's the it's a standard and kind of a visual style guide that Python has set out to make sure the Python code that you write is pretty smart and I don't know similar to everything else that other people write so it's discusses things about indentation discusses arguments How much how much spacing you should have between? Code how you should comment things and display variables, etc. Etc. I recommend you totally read through this But there is something that can kind of help Our code be this way So I'm gonna actually run through a little presentation that was put together by Audrey Roy Seems like a really awesome individual. She was doing a bunch of cool stuff with Python And this thing is all on the internet is a Python tricks. You can't live without and it's really about co-readability style comments, etc. And how to make your Python code awesome clear and understandable It really gets into self-documenting code It really gets into making sure that you're documenting things with comments and doc strings and it gets into the Zen of Python 2 Python is is something that's Not only a programming tool, but also a conceptual thing where you Have a certain code style and I don't know a way of programming that Is supposed to be great So I want to show this off this this module that keeps in mind Python's philosophy as you as you are a software developer and software engineer So I'm gonna fire that up an idle Just so it's a Python interpreter that looks pretty good If you haven't heard of idle it is the integrated developments learning environment I think for Python if you don't have it installed you can see to app get install idle and then You should be able to install it. Just fine. I've already have it installed. So I'll fire it up And then inside idle we can import this the syntax that they're using right there Just importing a module in Python and it tells us about the Zen of Python Beautiful is better than ugly explicit is better than implicit, etc. Etc. Really just this philosophy and mindset that we should have when you're writing Python code So To do that we want to be in line with that Python pep8 standard Pepe8 really argues that you should have been using four spaces no tabs blank lines, etc. etc so It's good to have all the stuff in the back of your mind, but it would be pretty awesome if we had some tools I can make sure our Python code Does this Just tools that automate the process for us like some plugins and sublime text to let's check out and install this Sublime linter is apparently something that can do this for us. We can install that package in Sublime text. I just hit control shift P to get the command palette up and then sublime linter after I search for a package It should okay now. Let's just install awesome. So now in our Python code Sublime linter looks like it's already cranking stuff out for us. It really hates all of my Spaces, so let's convert Looks like I can't find it in the menu as to how to convert our tabs to spaces, but we should be able to do it in the command palette Yeah, indentation convert to spaces and that works just fine for us And all of these trailing stuff within parentheses, I shouldn't have because pep8 does not like that It wants to have All of everything with inside parentheses. It wants to have No spaces so okay sublime linter looks pretty awesome for us and what else is there? command line pep8 checker. Oh, it looks like that's just a tool pep8. We can probably set up and install If I actually look in my terminal, it is something we can install from the repositories Awesome. So now that pep8 is available We can run that on the script that we just ran and we don't have any output or any errors So it looks like we're good Pilant looks like it can do pretty similar stuff Let's check that out. Pilant variables. Oh Wow, this is really cool. I actually haven't seen this before valid constant name I Wonder what all that stuff is Checking line comes like variable names are well-formed according to your coding standard. This is really cool I actually haven't seen Pilant before So this is definitely something to look into if you are interested in the kind of stuff that it looks like it's given out and valid name What else is there? And then the rest of this goes into important stuff That you can do with Python. That's pretty awesome But I really wanted to show off the pep8 standard. I really recommend you read through this but the sublime lint Package that we just installed looks like it'll be really awesome for us It'll make sure that the code that I write and also the code that you guys write is within the pep8 standard because actually I recorded a lot of these videos a While back and the standard that I use I had like really disgusting code braces that would represent like I actually commented out cold Code braces to represent my logic flow and I would end each line and Python was a semi colon Which was just hideous. No one liked it. I got I got a lot of flag for it So I'm trying to do a lot better with this time around so having these tools like pep8 That command line utility and now pilot. I want to look more into that and the sublime linter to keep things within the pep8 standard That should be pretty cool I hope you guys enjoy it and can actually follow along and use that same same tool with me So, all right, uh, that's really all I want to show off in this tutorial nothing big But keeping track when that pep8 standard and making sure the code that we write is within a certain compliant standard Thing so yeah, thanks for watching guys. See you soon