import pywikibot

site = pywikibot.Site('test', 'wikipedia')
page = pywikibot.Page(site, 'test')

page.text = 'Hello world!'
page.save()
Sleeping for 8.2 seconds, 2016-05-06 16:18:49
Page [[Test]] saved
replace.py -help

NameErrorTraceback (most recent call last)
<ipython-input-2-424ad924e573> in <module>()
----> 1 replace.py -help

NameError: name 'replace' is not defined