Re: [Tutor] CGI request handler bug?

2007-03-02 Thread Steve N
> I was playing with some simple HTTP CGI server code > and discovered what I think may be a bug in > CGIHTTPServer.CGIHTTPRequestHandler. A "GET" request > without a leading '/' from a telnet session displays > the CGI script rather than the script's output. If > the > request includes the leading

[Tutor] CGI request handler bug?

2007-03-02 Thread Steve N
Hi all, I was playing with some simple HTTP CGI server code and discovered what I think may be a bug in CGIHTTPServer.CGIHTTPRequestHandler. A "GET" request without a leading '/' from a telnet session displays the CGI script rather than the script's output. If the request includes the leading '/',

[Tutor] Why is this not an error?

2005-03-20 Thread Steve N
This code runs, but it seems to me it should generate a syntax error. Can someone explain what's going on? x = [1,2,3,4] z = 4 if z in x: print 'found:', z for i in x: print 'in the loop with', i else: print 'not found:', z >>> found: 4 in the loop with 1 in the loop with 2 in the l