Python Forum
python How to import All modules from namespace - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: python How to import All modules from namespace (/thread-3401.html)



python How to import All modules from namespace - harun2525 - May-20-2017

i tried to import all modules of namespaces but no modules imported.  how can I import all ?

example
# myfolder
#  | mymodule1.py
#  | mymodule2.py
#  | mymodule3.py
#  | subfolder

import myfolder # imports namespace
from myfolder import * # imports nothing. why ?



RE: python How to import All modules from namespace - buran - May-20-2017

you need to read about packages
https://docs.python.org/3.6/tutorial/modules.html#packages

also what you are doing - import myforlder (what you call import of namespace) and then from my folder import * expecting to import something from imported namespace - it doesn't make sense.