When importing a popular library, for example >>> import numpy
, and then >>> help(numpy)
, tons of tons of classes and functions are made available.
This is the structure of my package:
Blur/
├── __init__.py
├── blur
│ ├── __init__.py
│ ├── blur.py
│ ├── funcs
│ │ ├── __init__.py
│ │ └── funcs.py
│ ├── scripts
│ │ ├── __init__.py
│ │ └── blur_script.py
│ ├── tests
│ └── utils
│ ├── __init__.py
│ └── timer.py
└── setup.py
I do >>> import blur
and then >>> help(blur)
, I get this:
NAME
blur
PACKAGE CONTENTS
blur
funcs (package)
scripts (package)
utils (package)
FILE
/Users/admin/Documents/Studie/IN3110/assignment4/Blur/blur/__init__.py
I want import blur
to import the blur.py module, with its functions and classes. If I want to import blur.py I have to write import blur.blur
. Think it is a bit ugly, don't you think? How to do this with only import blur
?