Python Forum
python How to import All modules from namespace
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python How to import All modules from namespace
#1
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 ?
Reply
#2
you need to read about packages
https://docs.python.org/3.6/tutorial/mod...l#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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Different Ways to Import Modules RockBlok 2 516 Dec-11-2023, 04:29 PM
Last Post: deanhystad
  How to see the date of installation of python modules. newbieAuggie2019 4 1,572 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Import Modules TheBunyip 4 1,225 Mar-10-2023, 04:47 PM
Last Post: buran
  a bunch of modules to import Skaperen 2 883 Nov-07-2022, 07:33 PM
Last Post: Gribouillis
  Python modules for accessing the configuration of relevant paths Imago 1 1,365 May-07-2022, 07:28 PM
Last Post: Larz60+
  'namespace' shorthand for function arguments? shadowphile 5 2,585 Aug-11-2021, 09:02 PM
Last Post: shadowphile
  Python modules to extract data from a graph? bigmit37 5 22,379 Apr-09-2021, 02:15 PM
Last Post: TysonL
  Where to add own python modules in WinPython? HinterhaeltigesSchlaengelchen 1 2,273 Jan-21-2021, 07:45 PM
Last Post: snippsat
  Did interpreter 'compile' all import modules(from thrid-party) jamesyuan 10 4,279 Oct-19-2020, 10:49 AM
Last Post: jamesyuan
  [PyKML] Loop through all Placemarks; Remove namespace Winfried 2 3,415 Aug-28-2020, 09:24 AM
Last Post: Winfried

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020