selectel / pyte

Simple VTXXX-compatible linux terminal emulator
http://pyte.readthedocs.org/
GNU Lesser General Public License v3.0
653 stars 101 forks source link

capture.py sample not using pyte #114

Closed markfink closed 6 years ago

markfink commented 6 years ago

I am looking at your samples to get a better grasp on pyte. So far I am quite fond of it so thank you for sharing.

your capture.py sample contains the following line but does not do anything with it:

    stream = pyte.Stream(pyte.Screen(80, 24))

...so I commented it out and it is still "working".

I figured that if I wanted to use pyte during capture I would use something like the following:

    handle.write(stream.feed(data).display())

this gives me the following error: TypeError: cannot use a string pattern on a bytes-like object

superbobry commented 6 years ago

The purpose of capture.py is to capture the "raw" output of a terminal app. I think the line you've spotted is some leftover debugging code, I've removed it in the master version. Thanks for reporting!

The captured sessions are used in the test_input_output.