title: How to execute python module?
body: <blockquote>
  <p>I want to execute following Python module named JD.py using results.py
  file and  lines.txt. these files are given below:</p>
  </blockquote>
  <blockquote>
  <p>JD.py</p>
  </blockquote>
  <pre><code>def line_info():
   import fileinput
   import os
   n_1 = []
   for line in fileinput.input(os.path.join(os.path.dirname(__file__),'lines.txt')):
    s_n=0
    n_n=0
    C_1 = list(map(float,line.split( ))) # OR C_1 = [float(x) for x in line.strip().split()]
    X=[]
    Y=[]
    Z=[]
    n_1=[]
    X.append(C_1[0])
    Y.append(C_1[1])
    Z.append(C_1[2])
    s_n += 1
    n_n+=1
    n_1.append([s_n, n_n,C_1[0], C_1[1], C_1[2]])
    return n_1    
  </code></pre>
  <blockquote>
  <p><strong>results.py</strong></p>
  </blockquote>
  <pre><code>import JD as n_1 
  N= n_1.line_info()
  print(N)  
  </code></pre>
  <p>**</p>
  <p><strong>&gt; lines.txt</strong></p>
  <p>**</p>
  <pre><code>0.2356 0.7568 0.4389    
  0.6356 0.8568 0.5389   
  0.9356 0.7568 0.6689   
  0.0356 0.8568 0.6389   
  0.8356 0.2568 0.7389   
  0.8756 0.5568 0.8389  
  </code></pre>
  <p>but it gives first line of the .txt file only. how can I get the remaining lines of the .txt file as results.</p>