-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hey guys,
I'm practically still a beginner with python. I am working on a program that originally I used popen for but then switched to pexpect because it was easier for me to understand. I was hoping someone could help me get this working: I do a: child = pexpect.spawn ('cryptsetup --verbose --cipher "aes-cbc-essiv:sha256" --key-size 256 --verify-passphrase luksFormat ' + self.loopdevice) i = child.expect ([pexpect.TIMEOUT, '.*']) if i == 0: print 'ERROR!' print child.before, child.after child.sendline ('YES') print "Sent YES" child.expect ('.*') #child.sendline ('Test') child.send ('Test\n') print "Sent Pass 1" child.expect ('.*') child.send ('Test\n') print "Sent Pass 2" #child.sendline ('Test') This runs without errors but then to test I do a: [EMAIL PROTECTED] project]# losetup /dev/loop0 /home/user/deleteme [EMAIL PROTECTED] project]# cryptsetup luksOpen /dev/loop0 encr-container1 Enter LUKS passphrase: /dev/loop0 is not a LUKS partition Command failed: No key available with this passphrase. I can't understand this at all. If anyone can help I would appreciate it a lot. Thanks very much, Nate -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org iD8DBQFHsxnq/n+duykW6K8RAufNAKDP3BNCDAC/ALFuH8ht8qyETy5/xQCfS4i7 2aA9UoTLBZDRst0LPA9YstM= =rcB6 -----END PGP SIGNATURE----- _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor