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

  • SEARCH
  • Home
  • 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 8044139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:07:56+00:00 2026-06-05T05:07:56+00:00

I am learning how to use pexpect and i had a question. I am

  • 0

I am learning how to use pexpect and i had a question. I am trying to find the version number of a remote server and based on that version number I want to choose the right driver number. I am not entirely sure how should I go about doing this. Something along the lines of a getline function. Let me know if there are any functions I could use

  • 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-05T05:07:57+00:00Added an answer on June 5, 2026 at 5:07 am

    The child .before and .after properties contain the stdout before resp. after the matched expectation.

    import pexpect
    
    child = pexpect.spawn('cat /etc/issue')
    child.expect('Ubuntu.*')
    print(child.after)
    

    Which of the commands requires input? If it is the driver installation you could use fabric & fexpect:

    from ilogue.fexpect import expect, expecting, run
    
    output = run('get-system-version')
    
    prompts = []
    prompts += expect('Which driver version do you want to install?',output)
    
    with expecting(prompts):
        run('install-driver-command')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am learning to use HTML5 WebSockets and as part of that I am
I am learning to use redis and socket.io considering the number of advantages they
I'm learning to use vlad the deployer and I've got a question. Since I'm
I'm learning to use raw sockets, and im trying to prase out the tcp
I'm working on learning to use boost threads. I'm trying to make a simple
I'm interested in learning to use OpenGL and I had the idea of writing
I am learning to use json_decode . I want to try out some php
I'm learning to use Netbeans and for my intro pet projects, I don't want
I'm learning to use GWT 2.0 and I'm trying to convert the StockWatcher demo
I'm learning to use the write function and am trying to print only a

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.