473,508 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Bruce Eckel example / CGI server for localhost for Windows XP possible?

Bruce Eckel has a good article about using a browser as UI for
applications you write:

http://mindview.net/WebLog/log-0045

His example code is nice, he sets up a webserver *and is able to kill
it too via a HTML button*. But his webserver does not do CGI. I have
been trying to change the code with CGIHTTPRequestHandler and other
such things, I have also tried various "recipes" for CGI webservers,
but I can not get something that works well enough. Could well be
that my poor programming skill is to blame here. Especially handling
POST is important (if a user inputs a file via HTML <input type="file"
/> then you don't want the whole file in the URL location bar. I have
a version that handles the first POST but crashes on subsequent POSTs.
So now I just use the Apache CGi webserver, but this means that if I
want to give somebody else my CGI program they also have to install
Apache.

Is there anybody who can provide simple example code like found in
Fredrik Lundh's Python Standard Library book for setting up a CGI
server for localhost with Python? Perhaps the examples that are
available work on linux, but not on my Windows XP laptop with Python
2.3.3: GET works and the first POST works too, subsequent POSTs crash.
Jul 18 '05 #1
2 1766
Will Stuyvesant wrote:
Is there anybody who can provide simple example code like found in
Fredrik Lundh's Python Standard Library book for setting up a CGI
server for localhost with Python?


Not sure if this helps, but do you require a CGI style server?
Does it need to be extremely small and simple (though that's relative)?
If not, and servlet-style intelligent web applications also suit
your needs, you might be able to pick one of Python's web frameworks
and just run that on your local machine. Most won't need Apache.

At least, mine doesn't: Snakelets http://snakelets.sourceforge.net

I've heard from one user that he's using Snakelets to run a
web application off a CD-ROM...
(try an older Snakelets version <1.20 for that).

Good luck
--Irmen de Jong.
Jul 18 '05 #2
de Jong website great.
I get errors though when I click any link.
""""""
Exception in server
Page "/index2.y" caused an error: session is transported to different remote
address
Traceback (innermost last):
File "/home/promozilla/Server/snakeserver/webapp.py", line 410, in
run_Ypage_GET
self.pageEngine.addPageVars(page, self, req, resp)
File "/home/promozilla/Server/snakeserver/YpageEngine.py", line 123, in
addPageVars
session=webapp.addSessionCookie(request,response)
File "/home/promozilla/Server/snakeserver/webapp.py", line 486, in
addSessionCookie
session.setRequestData(request,response)
File "/home/promozilla/Server/snakeserver/websession.py", line 31, in
setRequestData
raise ValueError("session is transported to different remote address")
ValueError: session is transported to different remote address

"""

Jul 18 '05 #3

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

Similar topics

1
3742
by: Arindam Gupta | last post by:
I am searching for the softcopy of a book called "C++ Inside & Out" by Bruce Eckel. Can any one please help me find it? The book is out of print in the market. Thanks.
14
1833
by: John Spiegel | last post by:
Hi all, I'm missing something, probably stupid, on connecting to a SQL Server database from an aspx file. I haven't really done much w/ SQL Server and suspect that it's a problem on that side. ...
0
1604
by: Peter D. Dunlap | last post by:
I have a number of web sites on my 2003 server, each of the independent sites (i.e., not subdirectories of the localhost site). The way I have always set these up in the past is: 1. Create a...
6
2245
by: Marc | last post by:
How could I directly trigger a very simple on localhost and a known port listening server from my internet browser client? Local host means the little server would be running on the client machine,...
4
5237
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
7
2730
by: Greg P | last post by:
I know this is a long post, please bear with me. I have been working on this all weekend to no avail although I have done a good amount of research (see most pertinent links that I've looked at...
5
2191
by: arnuld | last post by:
Hi, recently i downloaded "Thinking in C" CD from Bruce Eckel's web-site as i wanted to learn C++ from his book "Thinking in C++". the CD did not play well on my LIGNUX distro (well it's my...
29
2780
by: Tony Girgenti | last post by:
Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro, SP2 computer. I'm using a web form. How do I...
2
5049
by: phoover.eml | last post by:
Does anyone know how to get a copy of the "Annotated Solution Guide" for Bruce Eckel's "Thinking in C++" ebook? I have tried to order it from the mindview.net web page. However, I get an error...
0
7224
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,...
0
7323
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,...
1
7038
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...
0
7493
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5049
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...
0
4706
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
415
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...

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.