From the course: Python Theory for Network Engineers
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Lab: Python modules for grouping - Python Tutorial
From the course: Python Theory for Network Engineers
Lab: Python modules for grouping
- [Instructor] In session five, I've create a folder called module example, and inside I have two Python files, one's lax.py and one's nyc.py. So remember, a python module is just any file that contains python code. And in lax.py, you could see I have a list, I have a string, I have a function, and I also have a class, right? And so it's just, basically encompasses many of the things that we've learned before. In nyc, I have basically the same mirror for the New York Data Centers versus the lax. So let's go ahead and look at the python ripple to see how we could utilize this new organization which we put it into a new folder. So first of all, let's import the sys module, which is part of the standard library, and talk about the search path. So when we have multiple python modules, multiple python libraries. When we install them, where did they go? I mentioned before that there's a certain search path. So let's look…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.