title: Run a python script from another python script and pass variables to it
body: <p>There are some similar questions that are asked; but, either the answers didn't cover a specific part that is a key point for me or I just couldn't understand. So, let me explain my question:</p>
  
  <p>I want to create 3 python scripts. Let's call them p1.py, p2.py and p3.py . When I run p1, it will gather the time information with</p>
  
  <pre><code>import datetime    
  captureTime = datetime.datetime.now()
  </code></pre>
  
  <p>then it will change the format of the date and store it with a variable as shown below</p>
  
  <pre><code>folderName = captureTime.strftime('%Y-%m-%d-%H-%M-%S')
  </code></pre>
  
  <p>Then, it will create a folder named by the value of the string 'folderName'.</p>
  
  <p>After this part, I don't know what to do.</p>
  
  <p>p1 should run p2 and p3, and pass the value of 'folderName' to them, then stop; and, p2 and p3 should create files under the folder named by the value of 'folderName'.</p>
  
  <p>Thank you.</p>