471,306 Members | 863 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

python web server questions

I am working on a task to display a wireless network nodes using
Google Earth (GE) with KML network links. I am using a simple python
webserver (see code below) to serve up the python scripts as KML
output to GE for this.

import BaseHTTPServer
import CGIHTTPServer
class Handler(CGIHTTPServer.CGIHTTPRequestHandler):
cgi_directories = ['/cgi-bin']
httpd = BaseHTTPServer.HTTPServer(('',8000), Handler)

This works fine for my initial scripts, but now I thinking of
combining the python scripts into the server program and making things
more efficient. The script file currently reads sensor data from
different I/O ports (GPS ->serial, network data -ethernet). I am
new to python, and was wondering if there might be a better way to run
the server side process than how I am doing it now:

1. GE client requests data through KML network link on a periodic
update interval
2. python webserver handles request and executes python script in cgi-
bin directory
3. python script reads sensor input from serial and ethernet ports and
writes data as KML output to GE client
4. repeat process at update interval

I am thinking if it would be better to make the process server-side
focussed as opposed to client side. Have the server only update
sensor data to the client when there has been a change in sensor data,
and only send the data that has changed. Has anyone had experience in
doing this with python that could point me in the right direction?

Dec 17 '07 #1
0 887

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by black | last post: by
4 posts views Thread by Skip Montanaro | last post: by
1 post views Thread by Joe T. | last post: by
2 posts views Thread by Efrat Regev | last post: by
37 posts views Thread by John Salerno | last post: by
2 posts views Thread by Roman | last post: by
14 posts views Thread by sridhar | last post: by
reply views Thread by hide1713 | last post: by
8 posts views Thread by Krypto | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.