Pythonのお勉強 Part23
at TECH
639:デフォルトの名無しさん
08/02/12 17:28:02
>>630
if __name__ == '__main__':
for e in getaddressfrompostcode('1620824'):
print e["town"].encode('utf-8')
print e["jiscode"]
print e["postcode"]
print e["pref"].encode('utf-8')
print e["pref_kana"].encode('utf-8')
print e["city"].encode('utf-8')
print e["city_kana"].encode('utf-8')
print e["town"].encode('utf-8')
print e["town_kana"].encode('utf-8')
print "".join([e["pref"],e["city"],e["town"]]).encode("utf-8")
print "".join([e["pref_kana"],e["city_kana"],e["town_kana"]]).encode("utf-8")
ユニコード文字列で返ってくるから
あとでテンプレートに流し込みにくい
明示的にutf-8に変換しないと駄目? > テンプレートに流し込むとき
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5386日前に更新/205 KB
担当:undef