Variables in python os.path
<p>I am new to python and I'm trying to create a program that creates a directory with todays date, create a sandbox into that directory and run the make file in the sandbox. I am having trouble getting the variables to be picked up in the os.path lines. The code is posted below:</p>

<pre><code>#!/usr/bin/python  
import mks_function  
from mks_function import mks_create_sandbox  
import sys, os, time, datetime  
import os.path  

today = datetime.date.today()  # get today's date as a datetime type  

todaystr = today.isoformat()   # get string representation: YYYY-MM-DD  
                           # from a datetime type.  

if not os.path.exists('/home/build/test/sandboxes/'+todaystr):  
 os.mkdir(todaystr)  
else:  
 pass  

if not os.path.exists('/home/build/test/sandboxes/'+todaystr+'/new_sandbox/project.pj'):  
 mks_create_sandbox()  
else:  
 pass  

if os.path.exists('/home/build/test/sandboxes/'+todaystr+'/new_sandbox/Makefile'):  
 os.system("make &gt;make_results.txt 2&gt;&amp;1")
</code></pre>

<p>Any help would be appreciated,
Thanks</p>
