title: Is there an easy way to distribute a Flask server as an executable?
body: <p>I'm building some simple editors with Backbone.js, and I'm hoping to be able to distribute them as apps for users to edit content in a mostly client-side way (i.e., I don't want users to have to futz with setting up stuff like MySQL or Apache).</p>
  
  <p>So I was imagining a scenario like:</p>
  
  <ol>
  <li>User downloads a .zip file</li>
  <li>In the resulting opened folder, the user clicks index.html</li>
  <li>That opens in a browser</li>
  <li>Backbone app starts, stores data in <code>localStorage</code></li>
  <li>The user can then export to CSV.</li>
  </ol>
  
  <p>Believe it or not, that would solve my problem: I want to help users edit data in a browser and then get it back out in a familiar format (CSV can be loaded into Excel, for instance).</p>
  
  <p>And I’d like to do this without forcing them to configure a server. It seems like this is almost possible in the HTML5 stack. However, in at least one browser (Chrome), this doesn't work, because I get errors like this one:</p>
  
  <pre><code>XMLHttpRequest cannot load file:///users/me/project/data/Appdata.json. Origin null is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>(Oddly enough, I don't get that error in Firefox, and the <code>.js</code> or <code>.json</code> files load fine.)</p>
  
  <p>So at this point it seems to me that there's no way around having these users use something kind of local server to serve up the Backbone interface. </p>
  
  <p>So, I'm trying to figure out how to build a distributable, cross-platform executable that will allow my users to start a Flask server. (I hope to build a REST backend to a Backbone.js app.)</p>
  
  <p>Is this wishful thinking? I'm assuming I can get the people in question to install Python.</p>
  
  <p>Is this doable? There seem to be many ways to package up Python programs, (pyinstaller? py2exe? ...) So I thought I would ask here in case someone might know of a solution for the stack I have in mind.</p>
  
  <p>TIA!</p>