Import everything from another module

Is there any way to import absolutely everything from one module into another?

At the moment I have to use

import Script;from Script import *;from Script import __html__, _hx

to get everything I need imported but I was hoping to do it all in one command.

If you’re using import * then you’ll often want to use __all__ as well.

In Script.py, put everything in __all__ including __html__ and _hx, then the wildcard will import everything that was specified.

__all__ = [
    # ...
    "__html__",
    "_hx",
]

If you truly mean “absolutely everything”: import Script; globals().update(Script.__dict__)

You probably don’t actually want this. This overrides variables like __name__, __path__ that will cause weird behavior later on. But there may be situations where you want this.

Overriding __all__ as suggested above is probably the correct solution.