Python: Relative Imports

preview_player
Показать описание
This course will cover how to use python in a commercial and professional working environment. This will teach you the tools, techniques and idiom that will help you to get started with python.
EP7: Relative Imports
EP8: Controlling imports with __all__
EP9: Namespace Packages
EP10: Executable Directories
EP11: Recommended Layout
EP12: Duck tailes modules are singleton
EP13: Summary

NOTE:
All the videos, songs, images, and graphics used in the video belong to their respective owners and I or this channel does not claim any right over them.

Copyright Disclaimer under section 107 of the Copyright Act of 1976, allowance is made for “fair use” for purposes such as criticism, comment, news reporting, teaching, scholarship, education and research. Fair use is a use permitted by copyright statute that might otherwise be infringing
Рекомендации по теме
Комментарии
Автор

I tried this on mac: absolute import works, but relative import says "ImportError: attempted relative import with no known parent package". I also tried to run the script with "python3 -m cow"

magneat
Автор

how would I go about importing something from a different directory or folder and a file from that folder into my current file?

alexw