Pywikipediabot/Pywikipediabot basics/Importing basic modules: Difference between revisions
Appearance
wikademia>Millosh |
wikademia>Eme m moved Archive:Pywikipediabot/Pywikipediabot basics/Importing basic modules to Pywikipediabot/Pywikipediabot basics/Importing basic modules over redirect |
| (2 intermediate revisions by one other user not shown) | |
(No difference)
| |
Latest revision as of 17:07, 8 November 2009
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.
<source lang="python"> mydir = "./" pwbdir = mydir + "pywikipedia/" import sys sys.path.append(pwbdir) from wikipedia import * </source>