Framawiki added a comment.

Hello @Mayank.jindal5 .
Common usage is python pwb.py nameofthefile.py for lunch python file directly with pywikibot loaded.
But because you use python in command line (shell), you have to manually import the library : import pywikibot should do this. Because you have downloaded the repo by git, you have to navigate to parent-folder of your downloaded git repo before lunch pythonin your command line (and then import pywikibot).
PWB should ask you to create a config file : try to run python pwb.py login (in PWB folder) or python pwb.py generate_user_files.pysee https://www.mediawiki.org/wiki/Manual:Pywikibot/generate_user_files.py)
For basic PWB use : https://www.mediawiki.org/wiki/Manual:Pywikibot/Create_your_own_script


TASK DETAIL
https://phabricator.wikimedia.org/T150299

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Framawiki
Cc: Magul, Mayank.jindal5, Xqt, TerraCodes, Mpaa, JJMC89, Aklapper, pywikibot-bugs-list, Framawiki, JakeTheDeveloper, Tbscho, MayS, Mdupont, MuhammadShuaib, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
pywikibot-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to