Search Result

Collapse
2 results in 0.0014 seconds.
Keywords
Members
Tags
pexpect
  •  

  • amruta21
    started a topic how to mount from python 2.6

    how to mount from python 2.6

    HHello,
    I am using python 2.6 on unix platform. I need to mount window drive from python. For that i done following code. But it does not get mounted.
    Code is Here..........
    Code:
    import pexpect
    cmd2="sudo mount -t cifs //<ip address>/FinalWork  /mnt/win"
    child = pexpect.spawn(cmd2)
    i = child.expect([' password .* ', pexpect.EOF, pexpect.TIMEOUT])
    if i == 0:
       print "******************sending
    ...
    See more | Go to post
    Last edited by bvdet; Aug 30 '11, 02:48 PM. Reason: Add code tags

  • How to flush pexpect spawn class buffer for subsequent expect calls??

    Python pexpect module's "spawn" class lets you interact with a spawned child process.

    As per its official API documentation on http://pexpect.sourceforge.net/pexpect.html


    *************** *************** *************** ****
    The maxread attribute sets the read buffer size. This is maximum number
    of bytes that Pexpect will try to read from a TTY at one time. Setting
    the maxread size to 1 will...
    See more | Go to post
    Last edited by bvdet; Jul 15 '11, 04:26 PM. Reason: Removed email address
Working...