• R/O
  • HTTP
  • SSH
  • HTTPS

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

sfjplib for python


File Info

Rev. f6bf83ccbc242faf3fc6fcd7916144eaee220512
크기 717 bytes
Time 2011-08-25 20:46:40
Author Hiromichi MATSUSHIMA
Log Message

add some files

Content

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""sfjplib.py"""

import getpass
import sys
import codecs

import sfjplib

sys.stdout = codecs.getwriter("utf_8")(sys.stdout)

if __name__ == "__main__":
    #uname = raw_input("Username: ")
    uname = "hiromichi-m"
    passwd = getpass.getpass("Password: ")
    u = sfjplib.SfjpUser(uname, passwd)
    r = u.login()
    d = sfjplib.Wiki(u)
    uid = "test11"
    name = "testpage"
    (title, text, comment, postkey) = d.retrive_wikitext(uid, name)
#    print title
#    print text
#    print comment
    print postkey
    d.post_wikitext(uid, name, u"ほげほげタイトル", u"ほげほげ本文", u"ほげほげコメント", postkey)