I have an internal module that I include in all my scripts. I have been treating it as an optional dependency by loading it like so
. This allows me to share my scripts and not have to worry about the internal module not existing on the users' system. But now I'm thinking it would be easier to manage by removing the extra boilerplate and including the module via the env var like so:
. This only works if the module exists, but I also need it to work if it does not exist. I've been playing around with the
module but haven't been able to get it to work for this case. Is it possible to do what I want?