Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "encoding" and "codec_errors" arguments to "spawn" #27

Open
EugeneLoy opened this issue Feb 16, 2020 · 2 comments
Open

Add "encoding" and "codec_errors" arguments to "spawn" #27

EugeneLoy opened this issue Feb 16, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@EugeneLoy
Copy link

Is your feature request related to a problem? Please describe.
I am trying to add windows support to my project and encoding-related args of spawn are not implemented.
To be specific, encoding and codec_errors are not implemented. I experienced this with WEXPECT_SPAWN_CLASS=SpawnSocket, probably true with other spawn classes.

Describe the solution you'd like
encoding and codec_errors arguments of spawn should be added and behave as in pexpect.

@raczben raczben added the enhancement New feature or request label Feb 20, 2020
@raczben
Copy link
Owner

raczben commented Feb 20, 2020

Can you express a specific use-case when you need these arguments?

I ask, because wexpect uses strings only*. The root-cause is that the ReadConsoleOutputCharacter returns python str not byte-string** see related part of wexpect. This is why I cannot see any reason for encoding. Whole wexpect project (the searchers, reader, writer functions) works with strings

So please describe your use-case.

*((SpawnSocket uses byte-string, but this is another topic))
**((More precisely PyUnicode))

@raczben
Copy link
Owner

raczben commented Feb 1, 2021

Similar to #47 and #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants