STINNER Victor added the comment:

Julien Palard added the comment:
> If we were able to pass an instance of SimpleHTTPRequestHandler instead of 
> its class, we'd be able to give the `directory` to the handler during the 
> `main()`, instead of using with `chdir` and `getcwd` to pass the information 
> in a kind of hidden/side channel.

You may be able to use functools.partial() to pass an additional
parameter to the request handler constructor.

We use something like that in asyncio for protocols.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28707>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to