Pywikibot/Pywikibot basics/Importing basic modules
< Pywikibot < Pywikibot basicsIt 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
This article is issued from Wikiversity - version of the Wednesday, November 11, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.