Skip to content

Commit

Permalink
Consistently use /usr/bin/env python2.7 in shebangs and commands.
Browse files Browse the repository at this point in the history
  • Loading branch information
soudy authored and lfaraone committed Oct 21, 2015
1 parent 136c55e commit d5435fa
Show file tree
Hide file tree
Showing 124 changed files with 166 additions and 166 deletions.
2 changes: 1 addition & 1 deletion analytics/management/commands/analyze_user_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Command(BaseCommand):
The duration flag can be used to control how many days to show usage duration for
Usage: python manage.py analyze_user_activity [--realm=zulip.com] [--date=2013-09-10] [--duration=1]
Usage: python2.7 manage.py analyze_user_activity [--realm=zulip.com] [--date=2013-09-10] [--duration=1]
By default, if no date is selected 2013-09-10 is used. If no realm is provided, information
is shown for all realms"""
Expand Down
6 changes: 3 additions & 3 deletions analytics/management/commands/client_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Command(BaseCommand):
Usage examples:
python manage.py client_activity
python manage.py client_activity zulip.com
python manage.py client_activity [email protected]"""
python2.7 manage.py client_activity
python2.7 manage.py client_activity zulip.com
python2.7 manage.py client_activity [email protected]"""

def add_arguments(self, parser):
parser.add_argument('arg', metavar='<arg>', type=str, nargs='?', default=None,
Expand Down
2 changes: 1 addition & 1 deletion api/bin/zulip-send
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# zulip-send -- Sends a message to the specified recipients.

Expand Down
2 changes: 1 addition & 1 deletion api/examples/create-user
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012-2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/edit-message
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/get-public-streams
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/list-members
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/list-subscriptions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/print-events
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/print-messages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/print-next-message
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/send-message
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/subscribe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/examples/unsubscribe
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

# Copyright © 2012 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/asana/zulip_asana_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/asana/zulip_asana_mirror
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Asana integration for Zulip
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/basecamp/zulip_basecamp_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/basecamp/zulip_basecamp_mirror
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Zulip mirror of Basecamp activity
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/codebase/zulip_codebase_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/codebase/zulip_codebase_mirror
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Zulip mirror of Codebase HQ activity
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/git/post-receive
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Zulip notification post-receive hook.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/git/zulip_git_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/hg/zulip-changegroup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Zulip hook for Mercurial changeset pushes.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/nagios/nagios-notify-zulip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import optparse
import zulip

Expand Down
2 changes: 1 addition & 1 deletion api/integrations/perforce/git_p4.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
#
# git-p4.py -- A tool for bidirectional operation between a Perforce depot and git.
#
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/perforce/zulip_change-commit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2012-2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/perforce/zulip_perforce_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/rss/rss-bot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# RSS integration for Zulip
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/svn/post-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Zulip notification post-commit hook.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/svn/zulip_svn_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/twitter/twitter-bot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Twitter integration for Zulip
Expand Down
2 changes: 1 addition & 1 deletion api/integrations/twitter/twitter-search-bot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
#
# Twitter search integration for Zulip
Expand Down
2 changes: 1 addition & 1 deletion api/setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-

import os
Expand Down
2 changes: 1 addition & 1 deletion assets/favicon/generate
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import xml.etree.ElementTree as ET
import subprocess

Expand Down
2 changes: 1 addition & 1 deletion bin/get-django-setting
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
from __future__ import absolute_import

import os
Expand Down
2 changes: 1 addition & 1 deletion bin/log-management-command
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import sys
import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion bots/check-mirroring
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import sys
import time
import optparse
Expand Down
2 changes: 1 addition & 1 deletion bots/check-rabbitmq-consumers
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

import sys
import time
Expand Down
2 changes: 1 addition & 1 deletion bots/check-rabbitmq-queue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

import sys
import re
Expand Down
2 changes: 1 addition & 1 deletion bots/cron_file_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import time

def nagios_from_file(results_file):
Expand Down
2 changes: 1 addition & 1 deletion bots/gcal-bot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import sys
import time
import datetime
Expand Down
6 changes: 3 additions & 3 deletions bots/irc-mirror.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /usr/bin/env python
#! /usr/bin/env python2.7
#
# EXPERIMENTAL
# IRC <=> Zulip mirroring bot
Expand Down Expand Up @@ -92,11 +92,11 @@ def on_dccchat(self, c, e):
return
self.dcc_connect(address, port)

usage = """python irc-mirror.py --server=IRC_SERVER --channel=<CHANNEL> --nick-prefix=<NICK> [optional args]
usage = """python2.7 irc-mirror.py --server=IRC_SERVER --channel=<CHANNEL> --nick-prefix=<NICK> [optional args]
Example:
python irc-mirror.py --irc-server=127.0.0.1 --channel='#test' --nick-prefix=username
python2.7 irc-mirror.py --irc-server=127.0.0.1 --channel='#test' --nick-prefix=username
--site=https://zulip.example.com [email protected]
--api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expand Down
2 changes: 1 addition & 1 deletion bots/jabber_mirror.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# Copyright (C) 2014 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
Expand Down
2 changes: 1 addition & 1 deletion bots/jabber_mirror_backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
#
# Copyright (C) 2013 Permabit, Inc.
# Copyright (C) 2013--2014 Zulip, Inc.
Expand Down
2 changes: 1 addition & 1 deletion bots/log2zulip
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
import subprocess
import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion bots/process_ccache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python2.7
import sys
import subprocess
import base64
Expand Down
2 changes: 1 addition & 1 deletion bots/sync-public-streams
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import sys
import os
import logging
Expand Down
2 changes: 1 addition & 1 deletion bots/tddium-notify-humbug
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# Copyright (C) 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
Expand Down
2 changes: 1 addition & 1 deletion bots/zephyr_mirror.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# Copyright (C) 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
Expand Down
2 changes: 1 addition & 1 deletion bots/zephyr_mirror_backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
# Copyright (C) 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
Expand Down
4 changes: 2 additions & 2 deletions docs/code-style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ styles (separate lines for each selector)::
Python
------

- Scripts should start with ``#!/usr/bin/env python`` and not
``#!/usr/bin/python``. See commit ``437d4aee`` for an explanation of
- Scripts should start with ``#!/usr/bin/env python2.7`` and not
``#!/usr/bin/env python2.7``. See commit ``437d4aee`` for an explanation of
why. Don't put such a line on a Python file unless it's meaningful to
run it as a script. (Some libraries can also be run as scripts, e.g.
to run a test suite.)
Expand Down
2 changes: 1 addition & 1 deletion docs/html_unescape.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python2.7

# Remove HTML entity escaping left over from MediaWiki->rST conversion.

Expand Down
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import os
import sys
import logging
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7

"""
Nagios plugin to check that none of our queue workers have reported errors.
Expand Down
2 changes: 1 addition & 1 deletion puppet/zulip/files/postgresql/process_fts_updates
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2.7
import psycopg2
import psycopg2.extensions
import select
Expand Down
Loading

0 comments on commit d5435fa

Please sign in to comment.