title: Copy lines from one file to another
body: <p>I trying to create a script that will allow me to designate an input file and take lines from that file and copy them into a separetly designated destination file. So far I have been able to get pretty close to my goal but the issues I am running into and that I cannot seem to find an answer to (that I can understand atleast) is that when I do my search on my string of data if the word "not" or "is" or any other scripting term is in my string it acts like it, meaning if I search on something like "This is not want I want" it takes the not operator into action and wont copy anything. So I guess my question is what can I do to stop this from happening (I've added my script to the bottom, be kind its my first attempt =)</p>
  
  <p>My second question maybe asking a little to much out of the program but I'll ask it anyway. Much like in the above say I have a txt file with 1000 lines of stuff (individual lines not like a paragraph) and 250 of them start with "This is the line I want to copy" but then each say an individual reason why (This is the line I want to copy cause its awesome, cause its purple. etc. etc) as it sits now my script will just pull the first "This is the part I want to copy" and leave it at that, is there a to have it grab the rest of the string from all of the lines?</p>
  
  <p>Again this might be an easy thing but since I am attempting some self education though trial and error some of the terminology I run across in troubleshooting is just as confusing as the problems I am having =)   </p>
  
  <pre><code>#This will let you search for a string in a file and transfer it to another file
  #It will search for texts or numbers
  
  print "This is a tool to search one file and transfer information to another."
  print
  #select source file
  a=open(raw_input("Enter full path of source file using using \\ instead of \: "), "r")
  #select destination file
  b=open(raw_input("Enter full path of destination file using \\ instead of \: "), "a")       
  a
  b
  #actual copy command
  copy=raw_input("What are you searching for: ")
  for line in a.readlines():
      if copy in line:
          b.write(copy + '\n')
          yes='y'
          for again in raw_input("Would you like to search for another line? y/n: "):
              if again in yes:        
                  copy=raw_input("What are you searching for: ")
                  if copy in line:
                      b.write(copy + '\n')
      b.close
      a.close
  </code></pre>