IDLE2:48 with Kenneth Love
Python comes with a text editor and graphical shell to use for writing and exploring Python named IDLE. In this video, I'll show you around this handy, but limited, tool.
So Python actually gives us a text editor that we can use as well. 0:00 It's not the best text editor around and 0:04 I recommend that you use something more substantial like Sublime Text or PyCharm. 0:06 But if you're just starting out it's okay. 0:11 So in your applications folder there should be a new folder that's called 0:14 Python 3.5, or 3.4, or whatever. 0:17 And inside there will be this little thing that's called IDLE. 0:20 And IDLE is the editor that we're going to use. 0:24 It's an okay way to play around with the language. 0:27 We're just gonna double click IDLE. 0:30 And for me it pops up on the other screen and this is what IDLE looks like. 0:32 Super duper fancy, right? 0:37 So by default it opens up a shell window. 0:39 So inside here you do things like print("hello world") and 0:42 it prints out hello world. 0:48 This is just like running Python in your terminal. 0:48 Probably not the kind of thing you're gonna want to do all the time. 0:52 So we're gonna go to File, and we're going to go to New File. 0:55 And that gives us, well, a new file. 0:58 IDLE doesn't give us line numbers, anything like that. 1:02 Down here in the corner, we get line and column, so you can see, no, I hit 80, 1:05 but that's really kind of about it. 1:09 There's not a whole lot here, as you can see. 1:12 If you look in preferences, 1:14 there's a little bit of stuff you can poke around with. 1:16 If you wanna change your font, make it a little bit bigger. 1:18 I generally prefer a bigger font. 1:22 Then you can do that. 1:25 You can change your highlighting scheme if you want. 1:26 You can change which keys do what thing. 1:29 And you can tell it if you want an edit window, 1:32 which is the text editor window, or a shell window and things like that. 1:34 So you can give it some rules on things you want it to do, but you don't have to. 1:38 So there's not a whole lot. 1:43 IDLE's kind of underpowered, but you know we could do like, 1:46 for num in range(10), print(num ** 2). 1:52 And we hit Command S, it's gonna ask us where to save it. 1:58 We can also go up here to Run, and say Run Module. 2:01 And it's gonna ask us where to save it. 2:05 And let's just say idle_test, and we'll save that. 2:07 And we run it and it runs it in our shell over here. 2:13 And so here's our squares from zero through nine.. 2:15 So it's nothing super duper complex is it? 2:19 We save it, we can run it with F5, anytime you press F5 it runs it all over again. 2:23 Now it's kinda cool though, I mean it's kinda nice just having this. 2:30 But like I said it's not the best editor. 2:33 I'll put links to other popular Python editors in the teacher's notes. 2:35 And look out for a workshop on PyCharm coming up, really soon. 2:39 So for right now though, I am going to go ahead and quit IDLE. 2:44
You need to sign up for Treehouse in order to download course files.Sign up