How to run a http server which serves a specific path?
<p>this is my Python3 project hiearchy:</p>

<pre><code>projet
  \
  script.py
  web
    \
    index.html
</code></pre>

<p>From <code>script.py</code>, I would like to run a http server which serve the content of the <code>web</code> folder.</p>

<p><a href="https://docs.python.org/3/library/http.server.html" rel="noreferrer">Here</a> is suggested this code to run a simple http server:</p>

<pre><code>import http.server
import socketserver

PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("", PORT), Handler)
print("serving at port", PORT)
httpd.serve_forever()
</code></pre>

<p>but this actually serve <code>project</code>, not <code>web</code>. How can I specify the path of the folder I want to serve?</p>