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() >>> sc('C:\Python26\mscripts') Traceback (most recent call last): File "<pyshell#69>", line 1, in <module> sc('C:\Python26\mscripts') File "<pyshell#68>", line 9, in sc dest.write(x+'\n','bold') TypeError: function takes exactly 1 argument (2 given) </code>
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor