Comments (8)
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.
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.
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.
oh yes, and you are correct -- "cp437_art" is the control characters are smileys & etc.
from pexpect.
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.
That is correct, technically a utf-8 byte sequence would fail "printable". its up to the decoder to raise UnicodeDecodeError, etc.
from pexpect.
Filed pull request #96 which includes a fix for this issue.
from pexpect.
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)
- PEP-0561 pexpect is not typed (py.typed) HOT 1
- .send() uses time.sleep - async version? HOT 1
- Issue with Select module HOT 3
- Support for new release HOT 3
- Two tests hang on `cat` HOT 3
- test_large_stdout_stream timeout HOT 1
- REPLWrapTestCase.test_existing_spawn fail on illumos HOT 1
- sdist is missing requirements-testing.txt
- AttributeError: module 'asyncio' has no attribute 'coroutine' HOT 1
- Incorrect DEVELOPERS.rst
- False positive expect_exact HOT 1
- Test REPLWrapTestCase.test_pager_as_cat fails.
- An asterisk appearing out of nowhere with Clojure
- Time for a release: any reason to delay? HOT 5
- 4.9.0: git tag does not match PyPI version HOT 2
- Handling SIGTSTP possible?
- Docs not updated for 4.9?
- 4.9: pytest fails in 3 units HOT 1
- "expect()" and "await expect()" have different results on completed processes
- Pexpect does not implement enough asynchronous methods to prevent the use of time.sleep().
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pexpect.