How should an option be passed to a Python module when importing it?
<p>I have a Python mathematics module that provides some relatively simple mathematical functions and that provides some very complicated ones that rely on another (very large) module that can take a while to import.</p>

<p>For some little scripts, I want only to use the little functions of my mathematics module and for some big scripts, I want to use the complicated functions it provides (which are dependent on the large module).</p>

<p>I could add the import of this large module to the complicated functions in my mathematics module so that the large module is imported only when its needed. That would work fine for the little scripts that don't need that functionality. However, then the big scripts would end up importing the large module multiple times (and remember that it takes a little while to import) so that isn't so good.</p>

<p>Is there some sensible way to structure my mathematics module to be able to deal with both the little scripts and the big scripts in the way I want or is there a way to pass to the module the need for no additional complexity (like: <code>import supermathematicsmodule(version = "lite")</code>).</p>