title: How to pass variable in exec statment in python
body: <p>I am having two python files as 1.py and 2.py.</p>
  
  <pre><code>**1.py is as** 
  class A:
         def __init__(self):
                x = 5
                y = 7
                NUMBERS = self
                fp = open(filePath)
                temp = fp.read()
                exec(temp)
                fp.close()
                ADD_METHOD()
  
  **2.py is as**
      def ADD_METHOD():
            print NUMBERS.x + NUMBERS.y
  </code></pre>
  
  <p>Now My question how this NUMBERS varaible is available in 2.py file.
  This is example for better view of problem, i know i can do this by importing module but the problem is that i have to do solution with exec() method and ho can i get NUMBERS in 2.py file ie should i have to pass this with exec as argument or some other approach.</p>
  
  <p>Any Help really appreciable
  Thanks         </p>