Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

chapter09/python-import-example

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python3 Import

An code template for exploring Python import mechanism.

Using this template, we explore potential traps in the following importing scenarios.

  • Importing a local module
  • Importing a sibling submodule from a submodule
  • Importing a module from the parent directory
  • Importing modules in __init__.py
  • ...

Todo:

  • namespace package v.s. regular package
├── impt
│   ├── __init__.py
│   ├── client
│   │   ├── __init__.py
│   │   └── client.py
│   ├── datasets
│   │   ├── __init__.py
│   │   └── datasets.py
│   ├── server
│   │   ├── __init__.py
│   │   ├── load_balance
│   │   │   ├── __init__.py
│   │   │   └── load_balancer.py
│   │   ├── process
│   │   │   ├── __init__.py
│   │   │   └── gpu_process
│   │   │       ├── __init__.py
│   │   │       └── gpu_process.py
│   │   └── server.py
│   └── utils
│       ├── __init__.py
│       └── utils.py
└── run.py

About

An template for exploring Python import mechanism

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.