title: Parsing a text file and outputting to new file
body: <p>I am a complete beginner to Python. I am coming across text files that I need to format. I basically need to take field data that starts with a certain character and output the field data to a new file which will have all the fields delimited by character of my choosing.</p>
  
  <p>Here is a short example.</p>
  
  <pre><code>; Record 1
  @FULLTEXT PAGE
  @T R000358
  @C ENDDOC# R000358
  @C BEGATTACH R000358
  @C ENDATTACH R000358
  @C MAILSTORE No
  @C AUTHOR 
  @C BCC 
  @C CC 
  @C COMMENTS 
  @C ATTACH 
  @C DATECREATED 11/23/2010
  @C DATELASTMOD 07/18/2010
  @C DATELASTPRNT 
  @C DATERCVD 
  @C DATESENT 
  @C FILENAME wrangling.wpd
  @C LASTAUTHOR 
  @C ORGANIZATION 
  @C REVISION 
  @C SUBJECT 
  @C TIMEACCESSED 00:00:00
  @C TIMECREATED 15:21:34
  @C TIMELASTMOD 09:04:12
  @C TIMELASTPRNT 
  @C TIMERCVD 
  @C TIMESENT 
  @C TITLE 
  @C TO 
  @C FROM 
  </code></pre>
  
  <p>For each 'Record' the '@C' and '@T' is the field delimiter followed by a space, then the field name followed by a space, then the field data. I need all the field data delimited in one row rather then a column as shown above.</p>
  
  <p>I am looking to output to a new file each record to something like this. </p>
  
  <p>"R000358","R000358","R000358","R000358","No",etc, etc. (in one row)</p>
  
  <p>This example is comma delimited but it may change but I figured I would start there.</p>
  
  <p>Any help would be appreciated. Thanks in advance.</p>