alternative for pexpect for windows platform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sumitgupta250290
    New Member
    • Sep 2010
    • 1

    alternative for pexpect for windows platform

    i have written a python code which telnets an ip address and reads and writes the read log into an output file
    it is working perfectly using pexpect but it works only on unix.
    is there any method so that the script can run on windows also.(other than cygwin)
    i tried telnetlib which reads the log correctly but i cant find any method to write it into an output file

    any help would be appreciated
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    I am unfamiliar with pexpect and telnetlib. My understanding is that pexpect is for Unix only, so telnetlib would be the way to go. Would redirecting sys.stdout to a file do what you want?

    Comment

    • dwblas
      Recognized Expert Contributor
      • May 2008
      • 626

      #3
      There is wexpect (you'll have to Google for it) but I don't personally know anyone who has tried it. It you try it, please let us know how it works.

      Comment

      Working...