On Tue, Aug 11, 2009 at 5:24 AM, prasad rao<prasadarao...@gmail.com> wrote: > Hello > I am wtriting some dat on to a file in which > headings should be of different size than other data. > Is it possible?If possible please tell me how to do it. > > <code> > > def sc(adir): > import os,myfiles > dest=open('C:/scripts.txt','w') > s=myfiles.myfiles(adir) > for x in s: > if os.path.isfile(x): > sorce=open(x,'r') > data=sorce.readlines() > dest.write(x+'\n','bold') > > dest.write(('-'*len(x))+'\n') > for l in data: > dest.write(l) > sorce.close() > else:pass > dest.close()
Plain text files don't have style information. You have to write structured data such as HTML or PDF. HTML is probably the simplest. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor