Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Maggie
On Sep 8, 12:35 pm, MRAB wrote: > Maggie wrote: > > On Sep 8, 11:39 am, MRAB wrote: > >> Maggie wrote: > >>> My code is supposed to enumerate each line of file (1, 2, 3...) and > >>> write the new version into the output file -- > >>> #!/usr/bin/python > >>> import os.path > >>> import csv > >>>

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread MRAB
Maggie wrote: On Sep 8, 11:39 am, MRAB wrote: Maggie wrote: My code is supposed to enumerate each line of file (1, 2, 3...) and write the new version into the output file -- #!/usr/bin/python import os.path import csv import sys #name of output file filename = "OUTPUT.txt" #open the file test

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Hendrik van Rooyen
On Tuesday 08 September 2009 17:22:30 Maggie wrote: > My code is supposed to enumerate each line of file (1, 2, 3...) and > write the new version into the output file -- > > #!/usr/bin/python > > import os.path > import csv > import sys > > #name of output file > filename = "OUTPUT.txt" > > > #open

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread Maggie
On Sep 8, 11:39 am, MRAB wrote: > Maggie wrote: > > My code is supposed to enumerate each line of file (1, 2, 3...) and > > write the new version into the output file -- > > > #!/usr/bin/python > > > import os.path > > import csv > > import sys > > > #name of output file > > filename = "OUTPUT.txt

Re: Output file formatting/loop problems -- HELP?

2009-09-08 Thread MRAB
Maggie wrote: My code is supposed to enumerate each line of file (1, 2, 3...) and write the new version into the output file -- #!/usr/bin/python import os.path import csv import sys #name of output file filename = "OUTPUT.txt" #open the file test = open ("test.txt", "r") #read in all the d

Re: Output File

2005-02-24 Thread Samantha
Thanks Steve. Appreciate it! S "Steven Bethard" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Samantha wrote: >> input = open(r'C:\Documents and >> Settings\Owner\Desktop\somefile.html','r') >> L = input.readlines() >> input.close >> >> output = open(r'C:\Documents and >> Setting

Re: Output File

2005-02-24 Thread Steven Bethard
Samantha wrote: input = open(r'C:\Documents and Settings\Owner\Desktop\somefile.html','r') L = input.readlines() input.close output = open(r'C:\Documents and Settings\Owner\Desktop\somefile_test.html','w') for t in range(len(L)): output.writelines(L[t]) output.close I think you want to do [1]: in