
On 30.08.2016 10:29, Victor Stinner wrote:
Le 30 août 2016 02:05, "INADA Naoki" <songofacandy@gmail.com> a écrit :
How should the option be set?
I propose to add a new -X utf8 option. Maybe if the use case is important, we might add an PYTHONUTF8 environment variable.
The problem is that I'm not sure that an env var is the right way to configure Python on such environment? But an env var shouldn't hurt and it is common to add a new env var with a new cmdline option.
I added PYTHONFAULTHANDLER=1/-X faulthandler for faulthandler and PYTHONTRACEMALLOC=N/-X tracemalloc=N for tracemalloc.
In PyRun we simply define a default for PYTHONIOENCODING and set this to utf-8: http://www.egenix.com/products/python/PyRun/doc/#_Toc452660008 The encoding guessing is still available by setting the env var to "" (but this is hardly used). So far this has been working great. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Aug 30 2016)
Python Projects, Coaching and Consulting ... http://www.egenix.com/ Python Database Interfaces ... http://products.egenix.com/ Plone/Zope Database Interfaces ... http://zope.egenix.com/
::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ http://www.malemburg.com/