Simple php script to python
<p>How do I convert this simple php script using python?
It basically checks whether the variable $<em>POST['page'] is set, and if it is, checks whether the respective page</em>.html file exists, and outputs it back to jQuery.</p>

<pre><code>&lt;?php

if(!$_POST['page']) die("0");

$page = (int)$_POST['page'];

if(file_exists('pages/page_'.$page.'.html'))
echo file_get_contents('pages/page_'.$page.'.html');

else echo 'There is no such page!';
?&gt;
</code></pre>
