[Tutor] [File Input Module]Replacing string in a file

Alan Gauld alan.gauld at btinternet.com
Thu Jan 28 19:36:53 CET 2010


"vanam" <raghavendra.gv.vanam at gmail.com> wrote

> Suppose if data.txt has string Python written in Font size 72 and when
> i display the string on the console ie. by below piece of code

Text files don't have font sizes, just text. To store formatting 
information
requires that data to be stored (separate to the text) in the file and then
the rendering program (word processor, browser etc) to interpret the
style information and display appropriately. But the text is always
independant of the formatting.

> It wouldnt print with the same Font size on the console (This wont
> prove anything wrong as the same font could be backed with a different
> file name)

It has nothing to do with the file name, the font size is all to do with 
the
presentation application and any format data stored within the file.
eg in HTML it will be in a style attribute of the text

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/ 




More information about the Tutor mailing list