Skip to content

Instantly share code, notes, and snippets.

@mgrouchy

mgrouchy/all.py Secret

Last active June 4, 2023 04:12
Show Gist options
  • Save mgrouchy/27ba5d158af587677e7bcaf47e431746 to your computer and use it in GitHub Desktop.
Save mgrouchy/27ba5d158af587677e7bcaf47e431746 to your computer and use it in GitHub Desktop.
import class from file.
__all__ = ['submodule1', 'submodule2']
# in your __init__.py
from file import File
# now import File from package
from package import File
from package import *
from package.file import File
from subpackage import *
@ReddyKilowatt
Copy link

Hi Mike
These files without the appropriate directory structure are not very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment