Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

inkdroid (3294)

  (email not shown publicly)
AOL IM: inkdroid (Add Buddy, Send Message)
Yahoo! ID: summe_e (Add User, Send Message)
Jabber: inkdroid

inkdroid is a person, not a robot. however, inkdroid likes ink. inkdroid likes perl too.

Journal of inkdroid (3294)

Friday March 05, 2004
11:32 AM


[ #17768 ]
Gotcha, so this is python:

import BaseHTTPServer

class HelloWorldServer( BaseHTTPServer.BaseHTTPRequestHandler ):
    def do_GET( self ):
        self.send_response( 200 )
        self.send_header( "Content-type", "text/html" )
        self.wfile.write( "hello world" )

server = BaseHTTPServer.HTTPServer( ( '', 8080 ), HelloWorldServer )

while 1:
    try: server.handle_request()
    except: break

Creates a non-forking HTTP server which responds to requests with "Hello World". I could get used to that. Right tool for the right job and all.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.