"Dan Liang" <[email protected]> wrote
def replaceTagging(source_name, target_name):
source_file = file(source_name, 'r')
source = source_file.read() # not really necessary
this reads the entire file as a string
target_file = open(target_name, "w")
# replacement loop
for line in source:
this iterates over the characters in the string.
Remove the two source lines above and use
for line in open(source_name):
HTH,
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor