import sys, re, codecs

def delete_symbols(han,zen):
    g = codecs.open("encode_temp.txt","r", "utf-8")
    texts=g.readlines()
    g.close()

    g = open("encode_temp.txt","w")
    g.write("")
    g.close()

    #print(han)

    g = codecs.open("encode_temp.txt","a", "utf-8")
    for n in texts:
        co_text = re.sub(han,"",n)
        co_text = re.sub(zen,"",co_text)

        if co_text == "\r\n" or co_text == "\n":
            pass
        else:
            g.write(co_text)

    g.close()

if __name__=="__main__":
    han="[!\#$%&()*+,-./:;<=>?@¥^_`{|}~｡､･｢｣]"
    zen="[！”＃＄％＆’（）＊＋，－ー．／：；＜＝＞？＠￥＾＿｀｛｜｝〜。、・「」]"
    delete_symbols(han,zen)
    pass
