Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Next let's talk a little bit about Python. This is a language that's often mentioned in the same breath as Ruby as it's a very clean and concise object oriented language. We're beginning to see a pattern here it's another language that comes with a really large library. In fact, that's one of the benefits of this language. There is a whole bunch of prewritten functionality we can just type into. Again, like Ruby it is an interpreted language. It's garbage collected. We don't have to worry about compilers. We don't have to worry about memory management.
And although, it's really powerful it's a very easy language to get started with. So what it is used for? Well, one of the great things about Python is totally cross-platform. There are Python interpreters on every platform that are well supported. It's a very easy language to build web applications with and ties in particular well with the Apache web server, but you'll also see it being used a lot as an embedded scripting language inside other applications. And it's used a great deal for building applications and web apps by companies like Google and Yahoo! So we want to know what does it look like.
Well, again it's one of these programs where we could have an entire valid program in one statement like with Ruby. We don't need a section called main. We don't need the semicolons. This is perfectly acceptable. But it doesn't teach us a lot. So let me add a few more lines. I can see that like Ruby we use the pound sign and hash mark as a comment and we use def for a define for describing a function, but here's an interesting thing. I'm defining a function here called sayhello that takes one parameter of name.
The question is where does it end? Well, Python is interesting, because it is one of the languages that does pay attention to indentation. We don't use the curly brace to mark the end of a function; we just indent the lines that are inside the function. So in this case, it's just one line. It says print 'hello' and follows it with the name parameter. So then down below this I can just call this function. Python knows the function has ended, because there are no more indented lines. Now that looks a little different, if you're used to either the word end or you're used to those curly braces, but it's leads to a very clean readable syntax.
Unlike Ruby, this is a very concise readable language that's easy to get started with. So how would we get started? Well, there are several IDEs and editors that support Python. Two common ones would be the Eclipse IDE with the extension PyDev that helps for Python development and Komodo as well. Although you'll find many programmers' text editors will support Python. Python interpreters are available on every platform and actually built into recent additions of Mac OS X, but the single best resource for getting started would be the website python.org.
This is the official Python website and has a great amount of installers, help, and tutorials for how to get moving with this language.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 101850 Viewers
61 Video lessons · 88602 Viewers
71 Video lessons · 72417 Viewers
56 Video lessons · 104112 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.