[Python-ideas] Add \e escape code

M.-A. Lemburg mal at egenix.com
Tue Jun 11 20:16:39 CEST 2013


On 11.06.2013 20:12, Alexander Belopolsky wrote:
> On Tue, Jun 11, 2013 at 1:10 PM, Steven D'Aprano <steve at pearwood.info>wrote:
> 
>>
>> I use it often enough to miss having \e, but not often enough to remember
>> what the hex or octal code for ESC is.
> 
> 
> +1
> 
> ANSI colors at the shell prompt are getting popular again these days.

How would you add a new escape character in a backwards compatible
way ?

Adding new escape characters is not easy, since Python defaults
to passing them through as-is, e.g. '\e' == '\\e'.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 11 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2013-07-01: EuroPython 2013, Florence, Italy ...           20 days to go
2013-07-16: Python Meeting Duesseldorf ...                 35 days to go

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   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/


More information about the Python-ideas mailing list