Skip to content

[FEAT] - make BufferedFile io compatible #2658

Open

Description

@asmodehn

Is this feature for paramiko acting as a client or a server?

Client

What functionality does this feature request relate to?

SSH

For client-side features, does this relate to a specific type of SSH server?

No response

If you're using paramiko as part of another tool, which tool/version?

OpenWisp

Desired behavior

paramiko implement BufferedFile, and this serves as the base of ChannelFile, which is the interface through which a client see the output/error of a command that was sent to the server.

There are missing functionalities here, and in recent python versions io specifies what a file should provide as interface. BufferedFile only support parts of that.

Anything else?

In my specific usecase, I want the client to retrieve the various output lines before a specific timeout, or before the command terminates (without actually breaking the connection, so it s not detected as exit)...
As far as I understand at this stage, this requires read1 to be implemented to be able to loop on it until a potential client side timeout.

There are probably quite a few other usecases that can be enabled with this as well. I ended up there after a few frustrations trying to deal with get_exit_status like other users

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions