Last change
on this file since 796 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 | ''' |
---|
4 | Created on 30 mars 2012 |
---|
5 | |
---|
6 | @author: Nicolas Vergnes |
---|
7 | ''' |
---|
8 | |
---|
9 | from http.server import HTTPServer, CGIHTTPRequestHandler |
---|
10 | |
---|
11 | # Port du serveur http |
---|
12 | port = 8080 |
---|
13 | # Allocation de l'objet de gestion du serveur |
---|
14 | httpd = HTTPServer(('', port), CGIHTTPRequestHandler) |
---|
15 | |
---|
16 | # On lance le serveur indéfiniement |
---|
17 | print('Lancement du serveur http sur le port: ' + str(httpd.server_port)) |
---|
18 | httpd.serve_forever() |
---|
Note: See
TracBrowser
for help on using the repository browser.