source: trunk/UTIL/PYTHON/mcd/proto/proto_http_server.py @ 805

Last change on this file since 805 was 639, checked in by aslmd, 13 years ago

UTIL PYTHON : Interfacing MCD with python. (Also a toy web server in proto; for the moment, do not use nor modify).

  • Property svn:executable set to *
File size: 434 bytes
Line 
1#!/usr/bin/python3
2# -*- coding: UTF-8 -*-
3'''
4Created on 30 mars 2012
5 
6@author: Nicolas Vergnes
7'''
8 
9from http.server import HTTPServer, CGIHTTPRequestHandler
10 
11# Port du serveur http
12port = 8080
13# Allocation de l'objet de gestion du serveur
14httpd = HTTPServer(('', port), CGIHTTPRequestHandler)
15 
16# On lance le serveur indéfiniement
17print('Lancement du serveur http sur le port: ' + str(httpd.server_port))
18httpd.serve_forever()
Note: See TracBrowser for help on using the repository browser.