print "Enter the file to read: " name=raw_input() in_file=file(name,"r") buffer=in_file.read() buffer=buffer.replace("&","&"); buffer=buffer.replace("\"","""); buffer=buffer.replace("<","<") buffer=buffer.replace(">",">") out_file=file(name+".html","w+"); out_file.write(buffer);
Monday, October 31, 2005
Code to HTML
This python program replaces the special HTML characters (present in code) with their HTML codes. The listing below has been made from the program itself :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment