Effective PyCharm Transcripts
Chapter: PyCharm Projects
Lecture: Navigation
Login or
purchase this course
to watch this video and the rest of the course contents.
0:00
When you're looking at your code, one of the really, really powerful things that PyCharm does for you is understand
0:06
how the files fit together, how maybe this rps, rock paper scissors game is using the shared lib 'ui_helper' right there and not just
0:18
one or two files, but many, many files as I've said before, But if you forget where to go to find out exactly what this is.
0:26
Again, this is a pretty simple example, but think 20, 30 thousand lines of Python, maybe it's a new project you just picked up.
0:33
Where is this, where is this coming from? Is this package they've installed? Is this another file, a module? Uh sub module in this application,
0:42
something like that. So there's a lot of cool things you can do. One option would be to go over here. So I want to know where this header is.
0:49
I can go to navigate and there's all sorts of cool stuff going on click implementation
0:55
or declaration and it's going to take us over here or is this navigate via command+v So now I don't have to use that awkward.
1:04
UI I can just come over here and command B and it'll take me here like Okay, great. Now I see where this header is coming from,
1:10
right. This is a file that I've created and it's this is a little breadcrumb
1:14
navigation bit to where the file is and you can actually navigate with these things as well, like you can go between these these pieces.
1:21
So that's really cool. But what I prefer is on Mac to hold down command and on Windows or Linux hold down control. And then as you move around,
1:32
notice everything becomes a hyperlink. Random is a hyperlink, notice it knows the file name, even here's the UI helper, here's the library,
1:42
this header. If I click on this, it takes me over there so cool and down here we have this random choice,
1:49
it's going to take us down well inside a Random, not super helpful, but it does take us there to show its inside the random
1:54
package. Get role. Where is that? I don't know. Oh there it is. Take this down here, right?
1:59
So if we just hold down command or control all of a sudden everything everything here like even where is this player to find?
2:07
Oh it's a parameter as opposed to say a global variable, which could have also been used in exactly the same way.
2:14
So I strongly recommend that you cruise around your code using command. It's really really nice.