title: Linux shell source command equivalent in python
body: <p>Converting a shell script to python and trying to find the best way to perform the following.  I need this as it contains environment variables I need read. </p>
  
  <pre><code>if [ -e "/etc/rc.platform" ];
  then
      . "/etc/rc.platform"
  fi
  </code></pre>
  
  <p>I have the 'if' converted but not sure how to handle the . "/etc/rc.platform" as source is a shell command.  So far I have the following</p>
  
  <pre><code>if os.path.isfile("/etc/rc.platform"):
      print "exists" &lt;just to verify the if if working&gt;
      &lt;what goes here to replace "source /etc/rc.platform"?&gt;
  </code></pre>
  
  <p>I've looked at subprocess and execfile without success.</p>
  
  <p>The python script will need to access the environment variables set by rc.platform</p>