пожалуйста, возвращайтесь позднее
пожалуйста, возвращайтесь позднее
>> PARLANTE: All right, so I'll draw you back. So, now, you may want to keep working on that a little bit. But I just want to — going to cut you short. I just want to show a few last things and then open up more time to [INDISTINCT] where you can keep working on this one, you can work in that corner or come what everyone. So — yeah, question. >> I have a general question. >> PARLANTE: Okay, question. >> How do you find things? And here's what I mean, all right. I didn't realize we've had in the handout additional information about this topic. So now I'm trying to find information about the OS file. >> PARLANTE: Yeah. So the question, I'm going to say, very much it was like, well, how do you find definition about Python modules? So, probably, I think with Google Search, it's like — for I'm about to show you the urllib module. And I suspect, if you do a Google Search for like Python URL Library or Python URL Module, the — you might say the hits are pretty good. So that's the free-form answer. The other answer is that python.org is the sort of official maintain sort of [INDISTINCT] and there's, you know, it's very browsable, there's a lot of organization modules there. So I think those are two pretty good answer. >> But, here is the problem. All right, just search under OS and they don't show you that there is os.path in there that you should actually be looking at. You get like... >> PARLANTE: Yes. So the problem is if you just do DIR on OS, it's hard to know that you need to look in os.path especially because [INDISTINCT]. So I think DIR, it's kind of a nice quick-and-dirty solution, but maybe doing a real Google Search and really looking at python.org. If you really want to browse is the more rich experience because DIR is like pretty [INDISTINCT], but it's attractive for like quick-and-dirty. So, I don't have — there's no — yeah, I don't have [INDISTINCT]. But — I mean why — this is progress in software, right, that it used to be in C. I mean you just had to write everything yourself. And now, with like Python and Perl and Java, whatever like, in a sense, you do have these libraries, I mean, it is a tremendous improvement. And, now — but there's this cost to like, "Well, we have to kind of do around and find them." So, oh well, progress. Okay. So what I want to show here is, you know, a couple — just mattering of things and then one more module and then get to this last exercise. So first of, I want to show you — this is just totally optional. Okay. You do not need to know this, but I just feel like it's something that's useful to know. I'm going to go back to my — there's "hello.py" — okay, yes. Here, you see the beautiful blue screen showing nothing. So earlier, I had written "hello.py" to be kind of a Cat utility. And so I've recreated that. And I want to just talk about this a little bit in particular to talk about exceptions. The need — you do not need to know exceptions through the exercise today, but I just think it's something that's useful to kind of have seen and so I want to spend a few minutes just mentioning how these works. So what this code does is — here's this function called Cat and it takes the filename argument. And all it does is it just, you know, it tries to read it and then it prints out — here, I had a print like " — -" and the filename and then it prints the text from the file.