pythonコードをWebページに変換

1752 ワード

import os;

f_in = open("hello.cpp", "r")
print "file name is: ", f_in.name

f_out = open("hello2_v2.html", "w")

f_out.write("


") for line in f_in: #line = line.strip('
') line = line.replace("", ">") print line, #f_out.write(line+"
") f_out.write(line) f_out.write("
")
f_in.close()
f_out.close()
import os;

f_in = open("hello.cpp", "r")
print "file name is: ", f_in.name

f_out = open("hello_table.html", "w")

f_out.write("

") # add form f_out.write("