Python 3 Tutorial for Beginners #19 - Modules & Packages

preview_player
Показать описание
Hey gang, in this Python 3 tutorial we'll go through modules and packages and how to import extra functionality into your programs.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- NODE.JS TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

thank you man. never understood the whole package concept until now. you have no idea how grateful I am for your tutorials. god bless you.

TheBriansle
Автор

Hi, I'm working from Ubuntu, but when I try to do the import, I get the error: ImportError: No module named 'person'. I am trying to import class A in my_project/source/person.py from a module in I have the __init__.py in both folders.Kindly help

doktari
Автор

Shaun that was bloody excellent. Was sitting here like a "donkey in front of the piano" (Spanish expression ) trying to take my Class out of the main program file. Beautifully clear explanation. Sorted!

edmcguigan
Автор

You have explained it easily and beautifully, I believe only the smartest and with-a-solid-knowledge people can do that, I know you are one of them ;)


Thanks you so much.

Yousifalzoubi
Автор

Question: When I use
print(f'Name: {naboo.Name}')
they file doesnt work because the letter "N" is capitalized in the import file and uncapitalized inthe module. I noticed it is the same with yours (your "classes.py" file has "name" and your "test.py" file has "Name")

Why does yours work, and mine doesnt? I am running Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32

Tay-kyfi
Автор

thank you....now i am totally clear about the concept of module and packages .

jerommangsang
Автор

Thank you man! It was such a nice and informative tutorial.

gurkanyesilyurt
Автор

Awesome video!
7:49 Your pet freaked the heck out of me. I was using head phones LOL

blank-vwsb
Автор

Very helpful mate I was looking around but nothing like this what is what I wanted!

ferradar
Автор

What python program do you use for this tutorial that allows you to my playlists? I am studying python as well and wish to do this as well

MWproification
Автор

how do i call classes if the module has many classes on it? is it enough just to type { from module1 import class again....from module1 import class 2}

hamseiggeh
Автор

Thank you so much Shaun for this video, I really liked it. And btw the formula for volume is 4/3*pi*r**3

anantmathur
Автор

A nice video describing Packages and Modules well.

Thank you The Net Ninja!

farkhodkuchkarov
Автор

Just wanna say another one big-big thank you! One day if (or when? :D) I get a job I will donate you for sure! All of these playlists are just amazing.

ridl
Автор

THANK YOU for the effort and time you put to help us .
I just wanna ask a about the packages we install using pip, how much detail do i have to know about them .
- am beginner django devoloper - i encounter much packages, especially when i started using channels (up to 18 packages) and i dont know if its crucial to know them well, i hope you could help me out .
I'm really sorry for the trouble and thank you again Shaun.

amjedalsadig
Автор

I'm just a freshman who made it that far but ı gotta say, that was the plainest explanation ı could ever find THANKS!

bahadireneser
Автор

Hi Shaun why am I getting an error that there is no module called classes?

blitzboy
Автор

for those who are practicing... calc.py code at @5:00

def planet_mass(gravity, radius):
mass = (gravity * radius** 2)/(6.67*10**-11)
return mass


def planet_vol(radius):
vol = (4*3.142*radius**3)/3
return vol

dattaveerboda
Автор

So packages (folders) contain modules (individual Python files). But what about a library? How does a library tie into this hierarchy?

BoxerDogs
Автор

Shaun is the best teacher ever! Maybe if we ask nicely he'll create some videos on quantum mechanics. :-)

NR-btyz