Skip to content

Exception on str decode & making it work in terminal #2

@pholat

Description

@pholat

def _(s): return s.decode('unicode_escape');

I'm in no way python enthusiast but this line results in error:

  File "/home/pholat/.local/lib/python3.6/site-packages/ansiescapes.py", line 8, in _
    def _(s): return s.decode('unicode_escape');
AttributeError: 'str' object has no attribute 'decode'

So shouldn't it be decode?
Also to actually use to manipulate terminal with sys.stdout.buffer.write imho ESC should be:
\033[ although there is character [ added, while it's not a part of escape key :) as well as it shouldn't be ansii_escaped so that it would actually work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions