On Dec 2, 10:13 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > > > The reason I need this is that my current best strategy to avoid ads in > > > web pages is putting all ad server names into /etc/hosts and stick my > > > local ip number next to them (127.0.0.1) so every ad request goes to my > > > machine. I run apache which has an empty page for 404 errors so I'll > > > In this case, do you need a webserver at all? If your browser tries to > > access a web server on 127.0.0.1 and there isn't one, won't the result, > > in most cases, be more or less the same as if the server returned a 404? > > Not quite, because if the browser doesn't get a response from the > server it will keep trying for a while and will only give up after > that. And then will display a "server not found, blablablabla" message > depending on the browser, which will appear in place of every ad. > That's ugly and it's better to have an empty page. > > Concerning the python solutions posted by several guys, they are too > heavyweight compared to a ~ 1-3 hundred lines of C code that one can > obtain from cheetah's source code.
Then use those lines of source, heh. No need to try to force python to fit every problem. If you have a solution that works better in some other language, then use it; we won't be angry. :) Regards, Jordan -- http://mail.python.org/mailman/listinfo/python-list