Giter Site home page Giter Site logo

Comments (8)

jquast avatar jquast commented on June 25, 2024

yes, this is wrong. will see.

also for cp437 line-drawing characters, you may be interested in:
https://github.com/jquast/x84/blob/master/x84/encodings/cp437_art.py

and maybe also, https://github.com/tehmaze/piece

from pexpect.

dcoshea avatar dcoshea commented on June 25, 2024

also for cp437 line-drawing characters, you may be interested in:
https://github.com/jquast/x84/blob/master/x84/encodings/cp437_art.py

I take it that the difference between this encoding and the standard cp437 one is that this one maps the first 32 characters to glyphs (smiley face, etc.) whereas the standard one leaves them with the same ordinal values?

and maybe also, https://github.com/tehmaze/piece

Thanks, but I think that wouldn't work so well for me as it wants me to give it a file, and it parses it all in one hit, whereas I need to feed it data read from a serial interface a byte at a time and process the parsed result.

from pexpect.

jquast avatar jquast commented on June 25, 2024

For a streaming terminal emulator "screen region" access, recommend then also, pyte, see stream.feed() call in example https://github.com/selectel/pyte/blob/master/examples/helloworld.py

from pexpect.

jquast avatar jquast commented on June 25, 2024

oh yes, and you are correct -- "cp437_art" is the control characters are smileys & etc.

from pexpect.

dcoshea avatar dcoshea commented on June 25, 2024

While I'm working on issue #84 - adding support for Unicode - is it okay if I just get rid of this check for whether the character is printable? If anyone really wanted to exclude non-printable characters, I think (haven't confirmed) that, with my fix for issue #84, they should be able to specify something like codec="ascii", and with the default setting of codec_errors="replace", most non-printable characters should get replaced.

from pexpect.

jquast avatar jquast commented on June 25, 2024

That is correct, technically a utf-8 byte sequence would fail "printable". its up to the decoder to raise UnicodeDecodeError, etc.

from pexpect.

dcoshea avatar dcoshea commented on June 25, 2024

Filed pull request #96 which includes a fix for this issue.

from pexpect.

jquast avatar jquast commented on June 25, 2024

Closing, pexpect's terminal emulation code remains next release but no longer improved, marked deprecated by #240 Suggest any terminal emulation / screen scraping code efforts moved to more concerted project efforts such as https://github.com/selectel/pyte

from pexpect.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.