STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Ok, here is a first version of my patch to implement os.environb:
 - os.environb is the bytes version of os.environ, both are synchronized
 - os.environ(b).data stores bytes keys and values on POSIX (but unicode on 
Windows)
 - create os.getenvb()->bytes
 - os.environb and os.getenvb() are not available on Windows nor OS/2
 - os.environ(b) et os.getenv(b)() accept both byte and unicode keys: that's 
maybe a stupid idea, I don't know yet :-)
 - fix #8513: subprocess: support bytes program name on POSIX
 - create os.fsencode() and os.fsdecode()

The patch is not done (the documentation should be updated), but it's a new 
step to help the discussion. I didn't tried it on Windows.

I already try twice to write os.environb some months ago, but I failed (it was 
too complex for me). os.environ and os.environb now share the same "data" 
dictionary, and their methods converts inputs and outputs if necessary.

----------
Added file: http://bugs.python.org/file17154/issue8514.patch

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

Reply via email to