Hi Bináris,
using the pwb.py wrapper is optional but you can call a script directly without it. There are a few advantages:
1. You don’t have to give script path where the script resides. You can give some user script paths in your user-config.py, it also searches for scripts in scripts/user scripts/ and scripts/ and finally in Pywikibot/scripts/ folder. 2. Scripts can be found even there is a spelling mistake in the script name you typed in. For example try pwb hello :) 3. The pwb.py checks wether your Python version is high enough. 4. The wrapper also validates dependencies and their version. 5. It provides all global options even your script does not use pywikibot.handleargs(). This may be useful e.g. to set different sites with, different user accounts with your script, run the script in simulation without api write, use a different user-config.py file. Also all numeric (and boolean) config values can be set as global option.
There is no disadvantage known when using it.
Best xqt
Am 16.11.2022 um 23:13 schrieb Bináris wikiposta@gmail.com:
Hi, I write scripts, mostly for temporary tasks. I understand, that pwb.py handles arguments and logs and finds my script in /scripts/userscripts. Most of these scripts don't excpect arguments, the task is wired in. So is there any advantage of using pwb.py in this case?
-- Bináris _______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org To unsubscribe send an email to pywikibot-leave@lists.wikimedia.org