Pywikipediabot/Pywikipediabot basics/Importing basic modules

From Wikiversity
Jump to: navigation, search

It is possible to make some other approach to calling basic PWB functions. However, the best idea is to keep your bot separately of PWB distribution. Because of that you should be inside of "mybot/" directory, not inside of "mybot/pywikipedia/" directory.

mydir = "./"
pwbdir = mydir + "pywikipedia/"
import sys
sys.path.append(pwbdir)
import wikipedia