title: Raspberry pi : How To Run A Python File From another file
body: <p>I have one python code running (A.py) when the python code reach a specific point i must run (B.py) while A.py is still running on the background</p>
  
  <p>A.py</p>
  
  <pre><code>count = 1
  while True:
      count++
      if(count%20 == 0)
           //run b
      print "A is running"
  </code></pre>
  
  <p>B.py</p>
  
  <pre><code>  x = 0
    while x &lt; 10
        print "B is running"
  </code></pre>
  
  <p>Answer must be like</p>
  
  <blockquote>
    <p>A is running
    A is running
    ... 46 times repeat
    A is running
    A is running
    A is running
    B is running
    B is running
    A is running
    B is running
    A is running</p>
  </blockquote>
  
  <p>A and b running does not have to be synchronized</p>