Hi; I'm running Pexpect (no discussion list) with the following code: #! /usr/bin/python import pexpect
def runVpopmail(whatdo, acct, domain, newpw, oldpw=''): if whatdo == 'vadduser': child = pexpect.spawn('/home/vpopmail/bin/%s %...@%s %s' % (whatdo, acct, domain, newpw)) elif whatdo == 'vchangepw': child = pexpect.spawn('/home/vpopmail/bin/%s' % (whatdo)) child.expect('Please enter the email address: ') child.sendline('%...@%s' % (acct, domain)) child.expect('Enter old password: ') child.sendline(oldpw) child.expect('Please enter password for %...@%s: ' % (acct, domain)) child.sendline(newpw) child.expect('enter password again: ') child.sendline(newpw) return child No matter whether I try to add a user or edit a password, the fn seems to return that everything is good, but nothing ever happens. When I place a return of the child value and run it with whatdo==vadduser I get the following output: version: 2.3 ($Revision: 399 $) command: /home/vpopmail/bin/vadduser args: ['/home/vpopmail/bin/vadduser', 'te...@globalsolutionsgroup.vi', 'qqq'] searcher: None buffer (last 100 chars): before (last 100 chars): None after: None match: None match_index: None exitstatus: None flag_eof: False pid: 1518 child_fd: 3 closed: False timeout: 30 delimiter: pexpect.EOF logfile: None logfile_read: None logfile_send: None maxread: 2000 ignorecase: False searchwindowsize: None delaybeforesend: 0.05 delayafterclose: 0.1 delayafterterminate: 0. I don't know what this means. Any ideas on how to troubleshoot this? TIA, beno
-- http://mail.python.org/mailman/listinfo/python-list