title: How do I setup a local HTTP server using Python
body: <p>I am trying to do some basic D3 programming. All the books I am reading talk about setting up a local http server and that is where I am finding myself stuck. I typed the following</p>
  
  <pre><code>python -m http.server 
  </code></pre>
  
  <p>to host the local server. Now, my problem is how to open my html file in this local server? I don't even know how to find the file in the command prompt. Any help will be appreciated. The following is my html file code on aptana. I also have put the d3.js file in the aptana. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;
              D3 Page Template
          &lt;/title&gt;
          &lt;script type="text/javascript" src="d3.js"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;script type="text/javascript"&gt;
          //D3 codes will go here
      &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When I am running aptana, the html file is opening in a regular firefox page. I want it to open in the locally hosted http server page. Any hints.</p>