Helper to produce a directory listing (absent index.html). Return value is either a file object, or None (indicating an error). In either case, the headers are sent, making the interface the same as for send_head().
http.server/SimpleHTTPRequestHandler.list_directory
SimpleHTTPRequestHandler.list_directory