Pythonのお勉強 Part23 at TECH
[2ch|▼Menu]
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