import pywikibot
site = pywikibot.Site('no', 'wikipedia')
site
APISite("no", "wikipedia")
page = pywikibot.Page(site, 'Bruker:Geanixx/Kladd 10')
page.exists()
True
page.text = 'Hello world, og så videre...'
page.save()
Page [[no:Bruker:Geanixx/Kladd 10]] saved
text = page.text
page.text = u"newText"
page.save(u"Edit comment")
Page [[no:Bruker:Geanixx/Kladd 10]] saved
pwb.py replace.py -help
  File "<ipython-input-14-364d1a96bced>", line 1
    pwb.py replace.py -help
                 ^
SyntaxError: invalid syntax
page.text = u"Ny Test"
page.save(u"Ny Test")
Page [[no:Bruker:Geanixx/Kladd 10]] saved
site
APISite("no", "wikipedia")
pwb.py replace -help
  File "<ipython-input-17-fc5ccab4e52f>", line 1
    pwb.py replace -help
                 ^
SyntaxError: invalid syntax