This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 vstinner
收信人 Arfrever, ezio.melotti, gregory.p.smith, lemburg, loewis, vstinner
日期 2010-04-30.23:03:47
SpamBayes Score 0.00017039976
Marked as misclassified
Message-id <1272668631.49.0.450830638783.issue8514@psf.upfronthosting.co.za>
In-reply-to
内容
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.
历史
日期 用户 动作 参数
2010-04-30 23:03:52vstinner修改recipients: + vstinner, lemburg, loewis, gregory.p.smith, ezio.melotti, Arfrever
2010-04-30 23:03:51vstinner修改messageid: <1272668631.49.0.450830638783.issue8514@psf.upfronthosting.co.za>
2010-04-30 23:03:50vstinner链接issue8514 messages
2010-04-30 23:03:49vstinner创建