Python - Call a function in a module dynamically
<p>I'm pretty new to Python and I have a situation where I have a variable representing a function inside of a module and I'm wondering how to call it dynamically. I have <code>filters.py</code>:</p>

<pre><code>def scale(image, width, height):
    pass
</code></pre>

<p>And then in another script I have something like:</p>

<pre><code>import filters

def process_images(method='scale', options):
    filters[method](**options)
</code></pre>

<p>... but that doesn't work obviously. If someone could fill me in on the proper way to do this, or let me know if there is a better way to pass around functions as parameters that would be awesome.</p>
