Hello PywikibotCommitWatcher,
I'd like you to do a code review. Please visit
https://gerrit.wikimedia.org/r/207054
to review the following change.
Change subject: Change shebang to /usr/bin/env python
......................................................................
Change shebang to /usr/bin/env python
Whenever running the pywikibot script in a virtualenv, refering to
/usr/bin/python might ends up running script with an unexpected version.
Replace all shebangs from /usr/bin/python to /usr/bin/env python
Change-Id: I205572d626d05873a727b01cfee44215fa653f6e
---
M generate_family_file.py
M generate_user_files.py
M pwb.py
M pywikibot/editor.py
M pywikibot/login.py
M scripts/add_text.py
M scripts/basic.py
M scripts/blockpageschecker.py
M scripts/blockreview.py
M scripts/capitalize_redirects.py
M scripts/casechecker.py
M scripts/catall.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/cfd.py
M scripts/checkimages.py
M scripts/claimit.py
M scripts/clean_sandbox.py
M scripts/commons_link.py
M scripts/commonscat.py
M scripts/coordinate_import.py
M scripts/cosmetic_changes.py
M scripts/create_categories.py
M scripts/data_ingestion.py
M scripts/delete.py
M scripts/disambredir.py
M scripts/editarticle.py
M scripts/featured.py
M scripts/fixing_redirects.py
M scripts/flickrripper.py
M scripts/freebasemappingupload.py
M scripts/harvest_template.py
M scripts/illustrate_wikidata.py
M scripts/image.py
M scripts/imagerecat.py
M scripts/imagetransfer.py
M scripts/imageuncat.py
M scripts/interwiki.py
M scripts/isbn.py
M scripts/listpages.py
M scripts/login.py
M scripts/lonelypages.py
M scripts/maintenance/cache.py
M scripts/maintenance/compat2core.py
M scripts/maintenance/make_i18n_dict.py
M scripts/maintenance/wikimedia_sites.py
M scripts/makecat.py
M scripts/match_images.py
M scripts/misspelling.py
M scripts/movepages.py
M scripts/newitem.py
M scripts/noreferences.py
M scripts/nowcommons.py
M scripts/pagefromfile.py
M scripts/patrol.py
M scripts/piper.py
M scripts/protect.py
M scripts/redirect.py
M scripts/reflinks.py
M scripts/replace.py
M scripts/revertbot.py
M scripts/script_wui.py
M scripts/selflink.py
M scripts/shell.py
M scripts/solve_disambiguation.py
M scripts/spamremove.py
M scripts/states_redirect.py
M scripts/template.py
M scripts/templatecount.py
M scripts/touch.py
M scripts/transferbot.py
M scripts/unlink.py
M scripts/unusedfiles.py
M scripts/upload.py
M scripts/version.py
M scripts/watchlist.py
M scripts/weblinkchecker.py
M scripts/welcome.py
M tests/checkimages_tests.py
M tests/data_ingestion_tests.py
M tests/ipregex_tests.py
M tests/pagegenerators_tests.py
M tests/pwb/print_env.py
M tests/pwb/print_locals.py
M tests/pwb/print_unicode.py
M tests/tests_tests.py
86 files changed, 86 insertions(+), 86 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/54/207054/1
diff --git a/generate_family_file.py b/generate_family_file.py
index 4993fd6..23b5833 100755
--- a/generate_family_file.py
+++ b/generate_family_file.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script generates a family file from a given URL.
diff --git a/generate_user_files.py b/generate_user_files.py
index 57a3f60..27b36f7 100755
--- a/generate_user_files.py
+++ b/generate_user_files.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to create user files (user-config.py,
user-fixes.py)."""
#
diff --git a/pwb.py b/pwb.py
index b96b002..20453b1 100755
--- a/pwb.py
+++ b/pwb.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Wrapper script to use Pywikibot in 'directory' mode.
diff --git a/pywikibot/editor.py b/pywikibot/editor.py
index 7d0aa1b..b143eea 100644
--- a/pywikibot/editor.py
+++ b/pywikibot/editor.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Text editor class for your favourite editor."""
from __future__ import unicode_literals
diff --git a/pywikibot/login.py b/pywikibot/login.py
index c0cc049..a898d3c 100644
--- a/pywikibot/login.py
+++ b/pywikibot/login.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Library to log the bot in to a wiki account."""
#
diff --git a/scripts/add_text.py b/scripts/add_text.py
index b4b6532..5bf4d0f 100755
--- a/scripts/add_text.py
+++ b/scripts/add_text.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
This is a Bot to add a text at the end of the content of the page.
diff --git a/scripts/basic.py b/scripts/basic.py
index b6d73be..fed147a 100755
--- a/scripts/basic.py
+++ b/scripts/basic.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
An incomplete sample script.
diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py
index bb416c7..b514cda 100755
--- a/scripts/blockpageschecker.py
+++ b/scripts/blockpageschecker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A bot to remove stale protection templates from pages that are not protected.
diff --git a/scripts/blockreview.py b/scripts/blockreview.py
index d78c9f9..1d99e7c 100755
--- a/scripts/blockreview.py
+++ b/scripts/blockreview.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot implements a blocking review process for de-wiki first.
diff --git a/scripts/capitalize_redirects.py b/scripts/capitalize_redirects.py
index 01746de..a0261c7 100755
--- a/scripts/capitalize_redirects.py
+++ b/scripts/capitalize_redirects.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bot to create capitalized redirects.
diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index b4b608b..6c33f06 100755
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bot to find all pages on the wiki with mixed latin and cyrilic
alphabets."""
#
diff --git a/scripts/catall.py b/scripts/catall.py
index 9fd468c..e12a9d6 100755
--- a/scripts/catall.py
+++ b/scripts/catall.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script shows the categories on each page and lets you change them.
diff --git a/scripts/category.py b/scripts/category.py
index dd8fe46..b1807bb 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Scripts to manage categories.
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 7860d67..2a0a389 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This bot will move pages out of redirected categories.
diff --git a/scripts/cfd.py b/scripts/cfd.py
index 0922e32..45891a9 100755
--- a/scripts/cfd.py
+++ b/scripts/cfd.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script processes the Categories for discussion working page.
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index a477953..bc8adf3 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to check recently uploaded files.
diff --git a/scripts/claimit.py b/scripts/claimit.py
index 099d9a2..f0ef707 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A script that adds claims to Wikidata items based on categories.
diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 9d42220..d0c9084 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot resets a (user) sandbox with predefined text.
diff --git a/scripts/commons_link.py b/scripts/commons_link.py
index c8ca521..523b339 100755
--- a/scripts/commons_link.py
+++ b/scripts/commons_link.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Include Commons template in home wiki.
diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index 75beea1..be0a8ad 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
With this tool you can add the template {{commonscat}} to categories.
diff --git a/scripts/coordinate_import.py b/scripts/coordinate_import.py
index 22541c1..323b42b 100755
--- a/scripts/coordinate_import.py
+++ b/scripts/coordinate_import.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Coordinate importing script.
diff --git a/scripts/cosmetic_changes.py b/scripts/cosmetic_changes.py
index bb99a30..466528d 100755
--- a/scripts/cosmetic_changes.py
+++ b/scripts/cosmetic_changes.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module can do slight modifications to tidy a wiki page's source code.
diff --git a/scripts/create_categories.py b/scripts/create_categories.py
index ac6f4e4..11c1cf6 100755
--- a/scripts/create_categories.py
+++ b/scripts/create_categories.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Program to batch create categories.
diff --git a/scripts/data_ingestion.py b/scripts/data_ingestion.py
index c30669e..a736c0b 100755
--- a/scripts/data_ingestion.py
+++ b/scripts/data_ingestion.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A generic bot to do data ingestion (batch uploading).
diff --git a/scripts/delete.py b/scripts/delete.py
index ed27a1e..5e2f1e3 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script can be used to delete and undelete pages en masse.
diff --git a/scripts/disambredir.py b/scripts/disambredir.py
index fe5bd49..dca7065 100755
--- a/scripts/disambredir.py
+++ b/scripts/disambredir.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
User assisted updating redirect links on disambiguation pages.
diff --git a/scripts/editarticle.py b/scripts/editarticle.py
index ca7b850..8a4e68e 100755
--- a/scripts/editarticle.py
+++ b/scripts/editarticle.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Edit a Wikipedia article with your favourite editor.
diff --git a/scripts/featured.py b/scripts/featured.py
index ed6347d..c6c04d2 100755
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Manage featured/good article/list status template.
diff --git a/scripts/fixing_redirects.py b/scripts/fixing_redirects.py
index ebfb555..539a2d6 100755
--- a/scripts/fixing_redirects.py
+++ b/scripts/fixing_redirects.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Correct all redirect links in featured pages or only one page of each wiki.
diff --git a/scripts/flickrripper.py b/scripts/flickrripper.py
index 38e97df..6e3272b 100755
--- a/scripts/flickrripper.py
+++ b/scripts/flickrripper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tool to copy a flickr stream to Commons.
diff --git a/scripts/freebasemappingupload.py b/scripts/freebasemappingupload.py
index 5722da6..ce0b218 100755
--- a/scripts/freebasemappingupload.py
+++ b/scripts/freebasemappingupload.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to upload the mappings of Freebase to Wikidata.
diff --git a/scripts/harvest_template.py b/scripts/harvest_template.py
index c131a23..5d0017a 100755
--- a/scripts/harvest_template.py
+++ b/scripts/harvest_template.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Template harvesting script.
diff --git a/scripts/illustrate_wikidata.py b/scripts/illustrate_wikidata.py
index cc1e4e2..9efbe07 100755
--- a/scripts/illustrate_wikidata.py
+++ b/scripts/illustrate_wikidata.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bot to add images to Wikidata items. The image is extracted from the page_props.
diff --git a/scripts/image.py b/scripts/image.py
index 512e863..53ab7aa 100755
--- a/scripts/image.py
+++ b/scripts/image.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script can be used to change one image to another or remove an image.
diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py
index d0e08d2..71b757e 100755
--- a/scripts/imagerecat.py
+++ b/scripts/imagerecat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Program to (re)categorize images at commons.
diff --git a/scripts/imagetransfer.py b/scripts/imagetransfer.py
index 1761790..6f58285 100755
--- a/scripts/imagetransfer.py
+++ b/scripts/imagetransfer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to copy images to Wikimedia Commons, or to another wiki.
diff --git a/scripts/imageuncat.py b/scripts/imageuncat.py
index e553851..ea51ad5 100755
--- a/scripts/imageuncat.py
+++ b/scripts/imageuncat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Program to add uncat template to images without categories at commons.
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index f98d9a6..12dc2f4 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to check language links for general pages.
diff --git a/scripts/isbn.py b/scripts/isbn.py
index b9b118e..ca7f0f1 100755
--- a/scripts/isbn.py
+++ b/scripts/isbn.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script reports and fixes invalid ISBN numbers.
diff --git a/scripts/listpages.py b/scripts/listpages.py
index c89be5a..c27cf43 100755
--- a/scripts/listpages.py
+++ b/scripts/listpages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
Print a list of pages, as defined by page generator parameters.
diff --git a/scripts/login.py b/scripts/login.py
index 1e87a4e..6a74c27 100755
--- a/scripts/login.py
+++ b/scripts/login.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to log the bot in to a wiki account.
diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index 72b06fb..73237ca 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This is a script written to add the template "orphan" to pages.
diff --git a/scripts/maintenance/cache.py b/scripts/maintenance/cache.py
index f05e9fd..753a794 100755
--- a/scripts/maintenance/cache.py
+++ b/scripts/maintenance/cache.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
This script runs commands on each entry in the API caches.
diff --git a/scripts/maintenance/compat2core.py b/scripts/maintenance/compat2core.py
index fb9ef6c..d5d097e 100755
--- a/scripts/maintenance/compat2core.py
+++ b/scripts/maintenance/compat2core.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
A helper script to convert compat 1.0 scripts to the new core 2.0 framework.
diff --git a/scripts/maintenance/make_i18n_dict.py
b/scripts/maintenance/make_i18n_dict.py
index bb6155f..fed25f3 100755
--- a/scripts/maintenance/make_i18n_dict.py
+++ b/scripts/maintenance/make_i18n_dict.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate a i18n file from a given script.
diff --git a/scripts/maintenance/wikimedia_sites.py
b/scripts/maintenance/wikimedia_sites.py
index ccd2417..4bc932d 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script that updates the language lists in Wikimedia family
files."""
#
diff --git a/scripts/makecat.py b/scripts/makecat.py
index b2885f5..f163353 100755
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
This bot takes as its argument the name of a new or existing category.
diff --git a/scripts/match_images.py b/scripts/match_images.py
index d74b715..ec8d92d 100755
--- a/scripts/match_images.py
+++ b/scripts/match_images.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Program to match two images based on histograms.
diff --git a/scripts/misspelling.py b/scripts/misspelling.py
index 6285bb2..eb3b6a2 100755
--- a/scripts/misspelling.py
+++ b/scripts/misspelling.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script fixes links that contain common spelling mistakes.
diff --git a/scripts/movepages.py b/scripts/movepages.py
index 300f2e0..3124435 100755
--- a/scripts/movepages.py
+++ b/scripts/movepages.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script can move pages.
diff --git a/scripts/newitem.py b/scripts/newitem.py
index fcf3873..ccb9605 100755
--- a/scripts/newitem.py
+++ b/scripts/newitem.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script creates new items on Wikidata based on certain criteria.
diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index 3fa562a..2472879 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script adds a missing references section to pages.
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index ac41e39..0a02c35 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to delete files that are also present on Wikimedia Commons.
diff --git a/scripts/pagefromfile.py b/scripts/pagefromfile.py
index 94cd310..aed0fb7 100755
--- a/scripts/pagefromfile.py
+++ b/scripts/pagefromfile.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bot to upload pages from a file.
diff --git a/scripts/patrol.py b/scripts/patrol.py
index 540bc42..95032be 100755
--- a/scripts/patrol.py
+++ b/scripts/patrol.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
The bot is meant to mark the edits based on info obtained by whitelist.
diff --git a/scripts/piper.py b/scripts/piper.py
index b015a0c..2dbcae0 100755
--- a/scripts/piper.py
+++ b/scripts/piper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot uses external filtering programs for munging text.
diff --git a/scripts/protect.py b/scripts/protect.py
index ad8a147..f53f147 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script can be used to protect and unprotect pages en masse.
diff --git a/scripts/redirect.py b/scripts/redirect.py
index ec99198..b770d47 100755
--- a/scripts/redirect.py
+++ b/scripts/redirect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to resolve double redirects, and to delete broken redirects.
diff --git a/scripts/reflinks.py b/scripts/reflinks.py
index 009e808..b1ab1ea 100755
--- a/scripts/reflinks.py
+++ b/scripts/reflinks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fetch and add titles for bare links in references.
diff --git a/scripts/replace.py b/scripts/replace.py
index 19a7855..25b0142 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
This bot will make direct text replacements.
diff --git a/scripts/revertbot.py b/scripts/revertbot.py
index abd3fbf..d8ba4d3 100755
--- a/scripts/revertbot.py
+++ b/scripts/revertbot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script can be used for reverting certain edits.
diff --git a/scripts/script_wui.py b/scripts/script_wui.py
index 052d721..2ff33b9 100755
--- a/scripts/script_wui.py
+++ b/scripts/script_wui.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bot which runs python framework scripts as (sub-)bot.
diff --git a/scripts/selflink.py b/scripts/selflink.py
index bcd284c..29c5369 100755
--- a/scripts/selflink.py
+++ b/scripts/selflink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot searches for selflinks and allows removing them.
diff --git a/scripts/shell.py b/scripts/shell.py
index a5de43b..39a02ec 100755
--- a/scripts/shell.py
+++ b/scripts/shell.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Spawns an interactive Python shell.
diff --git a/scripts/solve_disambiguation.py b/scripts/solve_disambiguation.py
index b91f0b3..74f3f52 100755
--- a/scripts/solve_disambiguation.py
+++ b/scripts/solve_disambiguation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
u"""
Script to help a human solve disambiguations by presenting a set of options.
diff --git a/scripts/spamremove.py b/scripts/spamremove.py
index c728e9b..c1e0e4a 100755
--- a/scripts/spamremove.py
+++ b/scripts/spamremove.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to remove links that are being or have been spammed.
diff --git a/scripts/states_redirect.py b/scripts/states_redirect.py
index a7b06fd..3c8a5ee 100755
--- a/scripts/states_redirect.py
+++ b/scripts/states_redirect.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Create country sub-division redirect pages.
diff --git a/scripts/template.py b/scripts/template.py
index f145fdc..11839e6 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Very simple script to replace a template with another one.
diff --git a/scripts/templatecount.py b/scripts/templatecount.py
index 5751641..d0c4e86 100755
--- a/scripts/templatecount.py
+++ b/scripts/templatecount.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script will display the list of pages transcluding a given list of templates.
diff --git a/scripts/touch.py b/scripts/touch.py
index 42d112e..25191a1 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot goes over multiple pages of a wiki, and edits them without changes.
diff --git a/scripts/transferbot.py b/scripts/transferbot.py
index 61dfbfd..f1b351b 100755
--- a/scripts/transferbot.py
+++ b/scripts/transferbot.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script transfers pages from a source wiki to a target wiki.
diff --git a/scripts/unlink.py b/scripts/unlink.py
index 103a9a0..6eeb715 100755
--- a/scripts/unlink.py
+++ b/scripts/unlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot unlinks a page on every page that links to it.
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py
index 61957a1..8f26682 100755
--- a/scripts/unusedfiles.py
+++ b/scripts/unusedfiles.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot appends some text to all unused images and notifies uploaders.
diff --git a/scripts/upload.py b/scripts/upload.py
index 0412b9b..7b05bdb 100755
--- a/scripts/upload.py
+++ b/scripts/upload.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Script to upload images to wikipedia.
diff --git a/scripts/version.py b/scripts/version.py
index 17d0b4b..d84b0b3 100755
--- a/scripts/version.py
+++ b/scripts/version.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to determine the Pywikibot version (tag, revision and
date)."""
#
diff --git a/scripts/watchlist.py b/scripts/watchlist.py
index 62770b4..9b09113 100755
--- a/scripts/watchlist.py
+++ b/scripts/watchlist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Allows access to the bot account's watchlist.
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index 175b8a2..3f7dbca 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This bot is used for checking external links found at the wiki.
diff --git a/scripts/welcome.py b/scripts/welcome.py
index cefbf93..8d44ad5 100755
--- a/scripts/welcome.py
+++ b/scripts/welcome.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
u"""
Script to welcome new users.
diff --git a/tests/checkimages_tests.py b/tests/checkimages_tests.py
index f033a88..25d3900 100644
--- a/tests/checkimages_tests.py
+++ b/tests/checkimages_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Unit tests for checkimages script."""
from __future__ import unicode_literals
diff --git a/tests/data_ingestion_tests.py b/tests/data_ingestion_tests.py
index 0b195fa..c1904c6 100644
--- a/tests/data_ingestion_tests.py
+++ b/tests/data_ingestion_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Unit tests for data_ingestion.py script."""
from __future__ import unicode_literals
diff --git a/tests/ipregex_tests.py b/tests/ipregex_tests.py
index 7553684..b0271aa 100644
--- a/tests/ipregex_tests.py
+++ b/tests/ipregex_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
"""Test IP regex."""
# -*- coding: utf-8 -*-
#
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index b76c955..1eb2260 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test pagegenerators module."""
#
diff --git a/tests/pwb/print_env.py b/tests/pwb/print_env.py
index 3bdf8ad..8c1e9e1 100644
--- a/tests/pwb/print_env.py
+++ b/tests/pwb/print_env.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
from __future__ import unicode_literals
diff --git a/tests/pwb/print_locals.py b/tests/pwb/print_locals.py
index 261327a..e53fde1 100644
--- a/tests/pwb/print_locals.py
+++ b/tests/pwb/print_locals.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
from __future__ import unicode_literals
diff --git a/tests/pwb/print_unicode.py b/tests/pwb/print_unicode.py
index a8fa757..20099e9 100644
--- a/tests/pwb/print_unicode.py
+++ b/tests/pwb/print_unicode.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script that forms part of pwb_tests."""
from __future__ import unicode_literals
diff --git a/tests/tests_tests.py b/tests/tests_tests.py
index c95c57d..8a23cfb 100755
--- a/tests/tests_tests.py
+++ b/tests/tests_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the tests package."""
#
--
To view, visit
https://gerrit.wikimedia.org/r/207054
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I205572d626d05873a727b01cfee44215fa653f6e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Hashar <hashar(a)free.fr>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: PywikibotCommitWatcher <pywikibot-commits(a)lists.wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>