[Tutor] Callable? Whats callable?
epoch7
epoch7@charter.net
Sun, 26 Aug 2001 12:13:16 -0400
alright. so i fixed the error in y. originally i started putting in the
read()s and stuff to be able to fix an error/find a workaround.
i was getting, here's how i got that error:
import re
file1 = raw_input("Name of file to convert: ")
file2 = raw_input("Name of file to output to: ")
in_file = open(file1, "r")
out_file = open(file2, "w")
x = in_file.read()
text = re.compile('url=(\w*)&', re.IGNORECASE)
y = text.findall(x)
y.write(text)
in_file.close()
out_file.close()
and here's the error
Traceback (most recent call last):
File "F:\Python21\reusage.py", line 11, in ?
y.write(text)
AttributeError: write
im sure you all know what im doing wrong...
will.
p.s. i threw print x in there after x = in_file.read()
and yes its working ok up to that point. that was a good idea, i wish i
thought of it earlier.