Hi,
I have an improvement suggestion, which you may or may not agree with.
I personally find the search function on the docs.python.org site to
pretty difficult to use effectively. If you do a search, it appears
that you get results first from method/class/package/etc names, ordered
lexicographically, then you get a section of fulltext search results,
also ordered lexicographically, then finally a section of fulltext
results from various HowTo's and FAQs. There is no indication of the
change between these sections, this is just from observation.
My issue is that I have no way of picking out which results are the most
relevant. If I use a search term like xml for instance, I first get
every keyword result from the names of things like
classes/packages/methods, which is a lot of things. Even down in the
fulltext results, I have no indication of relevance, everything is
ordered by lexicography, which means that items in Chapter 1 come first,
then Chapter 10-19, then Chapter 2, then Chapter 20-29, ... , and on and
on. Same with the FAQ/HowTo results.
I'm wondering if there is a reason for using results such as these and
not a more typical relevance based search? In fact you could still list
the names of things at the top, put a divider, and do relevance on the
fulltext entries, if you still want the name based things. I have a
Xapian powered search on a site I manage that does it quite capably and
with lightning speed.
As it stands now, I use the index to find things if I know what they are
called, and otherwise have to open a new tab and use Google. However,
if I'm looking for docs just on Python 3.x for instance, the query "xml
site:docs.python.org/py3k" yields only one result (I wonder, is
robots.txt set up to not index it?). So that means I'm more likely to
do "xml site:docs.python.org" and then click the link and change the
path to say "py3k" after the domain.
I know you guys probably have a lot to do - is there any way I can
assist in this area?
Thanks,
Jason
Dear python documentation maintainer,
I would like to submit a small text to the cgi module documentation to help other users use this module with BaseHTTPServer.HTTPServer. The current documentation (http://docs.python.org/library/cgi.html) shortly describes the usage of this module as a CGI under Apache. It does not covers at all the usage of cgi with BaseHTTPServer module. I've passed about an hour reading cgi.py sources to make it work, so I would like to share my knowledge with others.
Be so kind to include (mangled by you) the following text:
---------------------------------
Running with no parameters FieldStorage will read sys.stdin and use os.environ as environment variable. To use this module with BaseHTTPServer you must initialize FieldStorage with the rfile coming from WebHandler, pass headers as is and construct your ow environ to inform FieldStorage about the method used and the query string. Example for do_POST() function:
form = cgi.FieldStorage(fp=self.rfile, headers=self.headers.dict, environ={"REQUEST_METHOD": "POST", "QUERY_STRING": self.path})
See "print cgi.FieldStorage.__doc__" for more information on FieldStorage() parameters.
To upload files use enctype="multipart/form-data" . For example:
<form method="post" action="/my/url/to/python/script" enctype="multipart/form-data">
<input type="file" name="filename"/>
<input type="hidden" name="additional params" value="123"/>
<input type="submit"/>
</form>
---------------------------------
Thank you for your great work!
Sincerely yours,
Poltorak Sergeui
Terry J. Reedy <tjreedy(a)udel.edu> added the comment:
Please go ahead. I will gladly review anything you do.
----------
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue4966>
_______________________________________