Pywikibot has a pwb code entry point i.e. pwb.exe in <pythonpath>/Scripts. This wrapper script is able to call any script found in following folders:
- config.user_script_paths in base directory
- base directory (see https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.config.html#config.get_base_dir)
- pywikibot.scripts folder
The entry point works for script within pwikibot.scripts:
pwb version
but fails for framework scripts:
pwb redirect do ERROR: redirect.py not found! Misspelling?
To run the script one has to invoke it with:
pwb.py redirect do
(note the .py)
pwb.py usually resides in the topmost Pywikibot folder. Both should call the wrapper script.