python: Importing modules in project using dynamic naming
<p>My project layout looks like:</p>

<pre><code>run.py
jobs/
   job1.py
   job2.py
</code></pre>

<p><code>job1.py</code> is pretty basic:</p>

<pre><code>class job1():

    def __init__(self):
        print 'yo'
</code></pre>

<p>In run.py, I have:</p>

<pre><code>name = 'job1'
classname = 'jobs.%s' % name
__import__(classname)
</code></pre>

<p>Which obviously does not work:</p>

<pre><code>Traceback (most recent call last):
  File "run.py", line 5, in &lt;module&gt;
    __import__(classname)
ImportError: No module named jobs.job1
</code></pre>

<p>What is the best way to import the modules in this manner?</p>
