Printing from a text file quirk
AWasilenko at gmail.com
AWasilenko at gmail.com
Thu Mar 22 23:53:15 EDT 2007
Humm I think I messed up the code before I pasted it, I am now able to
get the left tag on the same line with this:
headerp1 = ""
for i in range(5):
headerp1 += self.headertxt.readline()
headerp2 = self.headertxt.readline(7)
headerp3 = self.headertxt.readline()
headerp4 = self.headertxt.read()
return headerp1 + headerp2 + pagetitle + headerp3 + headerp4
output:
<title>this is a new title
</title>
Now all's left is the </title> tag to get on the same line, or a
better solution, this seems like a very awkward way to do what I want.
More information about the Python-list
mailing list