Pywikipediabot/Pywikipediabot basics/Importing basic modules: Difference between revisions
Appearance
wikademia>Millosh New page: 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 o... |
wikademia>Millosh |
(No difference)
| |
Revision as of 19:52, 23 December 2007
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>