Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7759677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:41:30+00:00 2026-06-01T13:41:30+00:00

I will write a SSH communicator class on Python. I have telnet communicator class

  • 0

I will write a SSH communicator class on Python. I have telnet communicator class and I should use functions like at telnet. Telnet communicator have read_until and read_very_eager functions.

read_until : Read until a given string is encountered or until timeout.
read_very_eager : Read everything that's possible without blocking in I/O (eager).

I couldn’t find these functions for SSH communicator. Any idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T13:41:32+00:00Added an answer on June 1, 2026 at 1:41 pm

    You didn’t state it in the question, but I am assuming you are using Paramiko as per the tag.

    • read_until: Read until a given string is encountered or until timeout.

      This seems like a very specialized function for a particular high level task. I think you will need to implement this one. You can set a timeout using paramiko.Channel.settimeout and then read in a loop until you get either the string you want or a timeout exception.

    • read_very_eager: Read everything that’s possible without blocking in I/O (eager).

      Paramiko doesn’t directly provide this, but it does provide primitives for non-blocking I/O and you can easily put this in a loop to slurp in everything that’s available on the channel. Have you tried something like this?

      channel.setblocking(True)
      resultlist = []
      while True:
          try:
              chunk = channel.recv(1024)
          except socket.timeout:
              break
          resultlist.append(chunk)
      return ''.join(resultlist)
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a python script that will SSH to a server
We will write WCF service for our windows mobile client. Although we have the
I understand that when I use git pull --rebase , git will re-write history
How to write a java program which will tell me whether I have internet
I would like to write a script that will tell another server to SVN
I'm going to write first code for handling ssh commands on python and I
I have a bash program that will write to an output file. This file
i have to write program, which will create two child processes These processes would
I'm trying to write a Bash script that will SSH into a machine and
I want to write a script that will get me straight to a python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.