Pexpect echoes twice for each read

2008-09-09 Thread Sriram Rajan
For some reason, Using pexpect causes my output to echo twice when I connect from my MAC Darwin (10.4) to Linux (CentOS release 5 ): The program: - #!/usr/bin/python # Automatic scp to remote host # Input 1 : filename # Input 2 : destination folder # Input 3 : hostname import

Module re, extract on string match

2008-08-04 Thread Sriram Rajan
I am wondering if I can use re.search to extract from a particular location in a string. Example: string1='/Users/sriram/folder1/folder2/folder3/folder4/folder5/file' re.search ('folder3,string1) Thanks, Sriram -- http://mail.python.org/mailman/listinfo/python-list