I can't instantiate a simple class in Python
<p>I want to generate a Python class via a file.
This is a very simple file, named testy.py:</p>

<pre><code>def __init__(self,var):
    print (var)
</code></pre>

<p>When I try to instantiate it I get:</p>

<pre><code>&gt;&gt;&gt; import testy
&gt;&gt;&gt; testy('1')
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: 'module' object is not callable
</code></pre>

<p>Then , I try something else:</p>

<pre><code>class testy_rev1:
    def __init__(self,var):
    print (var)
</code></pre>

<p>I try to instanicate it and I get:</p>

<pre><code>&gt;&gt;&gt; import testy_rev1
&gt;&gt;&gt; a=testy_rev1('1')
Traceback (most recent call last):
File "&lt;stdin&gt;", line 1, in &lt;module&gt;
TypeError: 'module' object is not callable
&gt;&gt;&gt; a=testy_rev1.testy_rev1('1')
1
</code></pre>

<p>What I am looking for is a way to import it from a file w/o resorting to:</p>

<pre><code>import &lt;module name&gt;.&lt;module name&gt;
</code></pre>
