title: NameError while using eval() function
body: <p>I'm trying to call a module from another module by using the <code>eval()</code> function it is calling successfully but in console output i am getting error message like "NameError: name 'Login_CSA' is not defined"</p>
  
  <p>I have written the code like this</p>
  
  <p>In sample.py module </p>
  
  <pre><code>import ReferenceUnits
  
  def calling():
      str='Login_CSA'
      eval(str)
  
  calling()
  </code></pre>
  
  <p>In ReferenceUnits.py </p>
  
  <pre><code>import Login_CSA
  </code></pre>
  
  <p>and in Login_CSA.py I have written</p>
  
  <pre><code>def Hai():
      print "hello this is somesh"
      print 'hi welcome to Hai function'
  
  Hai()
  </code></pre>
  
  <p>It is executing but finally getting error message like <code>"NameError: name 'Login_CSA' is not defined"</code></p>
  
  <p>Why is this so?</p>