import a_ridiculously_long_module_name as short_name
also works for
import module.submodule.subsubmodule as short_name
More Related Contents:
- How do I unload (reload) a Python module?
- Importing modules from parent folder
- `from … import` vs `import .` [duplicate]
- Why is Python running my module when I import it, and how do I stop it?
- How to import a Python class that is in a directory above?
- Callable modules
- List all the modules that are part of a python package?
- Importing modules: __main__ vs import as module
- ModuleNotFoundError: What does it mean __main__ is not a package?
- Import a python module without running it
- Python: Why should ‘from import *’ be prohibited?
- Import module works in terminal but not in IDLE
- How to properly use relative or absolute imports in Python modules?
- How to reference python package when filename contains a period
- How to do relative imports in Python?
- How to import a module given its name as string?
- How to make a cross-module variable?
- Automatically create requirements.txt
- Execution of Python code with -m option or not
- adding directory to sys.path /PYTHONPATH
- What happens when a module is imported twice?
- Absolute vs. explicit relative import of Python module
- How to unimport a python module which is already imported?
- Should I use `import os.path` or `import os`?
- ImportError: No module named ‘selenium’
- Python importing a module from a parallel directory
- Check if Python Package is installed
- How to test or mock “if __name__ == ‘__main__'” contents
- Why does Paramiko hang if you use it while loading a module?
- How to add a Python import path using a .pth file