Hi, all

    I have two block code as:

Block 1:
            #......
pobj = subprocess.Popen (["passwd", user], stdout=subprocess.PIPE, stdin = subprocess.PIPE)
            password = password + "\n"
            pobj.stdin.write (password)
            pobj.stdin.write (password)
            #......
Block 2:
            #......
pobj = subprocess.Popen (["pdbedit", "-a", user], stdout=subprocess.PIPE, stdin =subprocess.PIPE)
            password = password + "\n"
            pobj.stdin.write (password)
            pobj.stdin.write (password)
            #......

The only difference is command to run, but code of Block 1 runs OK, and Block 2 can't write the password to "pdbedit". Is there any thing wrong with the code above or if something else cause Block 2 failed? Any suggestion ?

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to