Effective PyCharm Transcripts
Chapter: Tool windows
Lecture: File structure

Login or purchase this course to watch this video and the rest of the course contents.
0:01 The final little window feature thing to check out is project structure, or file structure. So over here in my project, we have just the file,
0:11 notice I have opened up my Jumpstart course demos just because I need something more complicated
0:16 than what we've written so far in this course, not much, but a little bit. So over here in this wizard battle,
0:22 which we've played with before, we have our actors, so we can explore the file structure like this but this structure structure thing
0:32 is for structure of the individual file that you have open, over here is program, you can see we have some methods here
0:41 and over in actors, well we have some classes and we can either just have them in the order that they appear
0:48 or we can have them alphabetically sorted, let's go with alphabetically, and by default it's all sort of collapsed here
0:55 so we can expand this and see what is in creatures, do you want to go to the get defensive roll— boom, we're there,
1:01 do you want to go to the level where it's defined, it's right there.
1:03 Similar with small animal, get defensive roll, it's overwritten version, there it is.
1:08 So this is all pretty cool, we can actually look at it in greater depth, if you want to look at all the inherited stuff,
1:15 so there's creature, here is dragon, you could see the highlights or the colors are for the ones that it actually implements
1:22 and then the gray is for the stuff that it comes from the base class,
1:24 so for example, we are in dragon which gets its level from right there, from creature, so this can kind of help you look at some code and go
1:33 okay, I think this thing has a level, where does it come from, right,
1:36 this will help you somewhat, there are probably other ways just go into definition. So this is pretty cool, but you can see
1:42 it takes all of the dunder methods as well which is pretty intense, so generally I would say turn that off. And not a whole lot more to it than this,
1:50 but be sure to flip over here if you are trying to quickly navigate between files, or within a file that's fairly complicated like this one
1:58 that has four classes that all derive from each other.


Talk Python's Mastodon Michael Kennedy's Mastodon