Skip to content
Snippets Groups Projects
user avatar
cpettet authored
This is what is imported at the beginning of the examples.
This could also be done by changing the import to 'import mwclient'
rather than 'from mwclient import Site'.

Neither seems more correct but I have tried to follow
what seems most intended.

>>> from mwclient import Site
>>> site = mwclient.Site('en.wikipedia.org')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'mwclient' is not defined

vs.

>>> site = Site('en.wikipedia.org')
>>> page = site.pages['Greater guinea pig']
>>> text = page.text()
>>> page.exists
True
7f59df33
History
Name Last commit Last update
..