<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
Hi all,<BR>
I'm trying to build a program to set up a vpn connection. I'm using pexpect to handle this, but I can't get it to work. <BR>
The sendline() is causing troubles. I tested it in the interactive promt, with these results:
<PRE>
>>> import pexpect
>>> child = pexpect.spawn("vpnc-connect tudelft\ nopass.conf")
>>> child.expect(".* password .*: ")
0
>>> child.sendline("[here_my_password]")
7
</PRE>
The sendline returns an exit code 7, but I don't what it should be. I saw an example here, where sendline returns an exit code 10: <A HREF="http://www.jinx.com/forum/topic.asp?TOPIC_ID=53947">http://www.jinx.com/forum/topic.asp?TOPIC_ID=53947</A>. After this peace of code, I don't have a vpn connection. I'm sure my password is correct. What's going wrong?<BR>
<BR>
Thanks in advance,<BR>
Jurian Sluiman<BR>
<BR>
</BODY>
</HTML>