473,765 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(CGIHTTP Server.CGIHTTPR equestHandler):
cgi_directories = ['/cgi-bin']
httpd = BaseHTTPServer. HTTPServer(('', 8000), Handler)
httpd.serve_for ever()

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?

thx
Dale
Dec 17 '07 #1
0 972

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1558
by: black | last post by:
Howdy everyone~ i heard Python could be used in web programming and aftering searching many docs just found something on Python and CGI. the fact is i know nothing about CGI and most of my projects(both of company and myself) are established with PHP and ASP. now the questions come: 1. Could Python be used in web programming ? (i guess yes ?) 2. If the answer of above is yes, then can we programms with Python in both server and client...
4
1657
by: Skip Montanaro | last post by:
(moving over from webmaster mailbox) scott> I'm sorry for bothering you, but I've tried to post to the Python scott> Tutor Mail List, tried to get someone from Bay PIggies to scott> respond, but no one is responding to my questions. If you don't scott> want to answer my questions, I'd appreciate an e-mail stating scott> that. My questions are as follows: A better place to post this would be to python-list@python.org (I've cc'd that...
1
1191
by: Joe T. | last post by:
Hello group, I'm new to Python and have a couple of beginner questions that I'm hoping someone can answer. 1. Is python something that you would recommend using for server side web programming? Something like C# or Java? If so, are there any resources that you could point me to that would help me with server side python programming for dynamic html data? Most of the tutorials that I see deal with the Shell but I'd like to know more...
2
2022
by: Efrat Regev | last post by:
Hello, I'm a data-structures course TA trying to write a python CGI script for automatically compiling and testing students' projects. Unfortunately, I've run into some questions while writing this, which I couldn't solve with the various (and helpful) python-CGI documentation. (It's possible that I'm posting to the wrong group; if so, I'd appreciate suggestions for the appropriate group.)
37
2499
by: John Salerno | last post by:
I contacted my domain host about how Python is implemented on their server, and got this response: ------------------- Hello John, Please be informed that the implementation of python in our server is through mod_python integration with the apache. These are the steps needed for you to be able to run .py script directly
2
1457
by: Roman | last post by:
I am new to python. I am looking to read in a 12mb csv file, parse it, generate web pages, summarize on a column and make drop down bottons. Where would I be able to find sample code that does something similar to this? Also, I know that microsoft has put out .net beta version of it. If I am using windows server, I am confined to use iron python? or are there
14
9900
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com' toAddress = 'sridhar_kasturi@satyam.com' msg = "Subject: Hello\n\nThis is the body of the message." import smtplib
0
1026
by: hide1713 | last post by:
Hi everyone We are making a disk less workstation environment which support python.We use PXE DHCP TFTP to boot up disk less system.There are three choices as i know to set up a python environment for diskless system. First Solution, Use a initrd image with everything inside as the root file system.Diskless computer boots up with a kernel and this rootfs image.If everything goes fine.We could use python in the ram disk.In my...
8
7984
by: Krypto | last post by:
Hi, I have used Python for a couple of projects last year and I found it extremely useful. I could write two middle size projects in 2-3 months (part time). Right now I am a bit rusty and trying to catch up again with Python. I am now appearing for Job Interviews these days and I am wondering if anybody of you appeared for a Python Interview. Can you please share the questions you were asked. That will be great help to me.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2805
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.