diff --git a/analytics/management/commands/analyze_user_activity.py b/analytics/management/commands/analyze_user_activity.py index bcd9b82389..76863b4f96 100644 --- a/analytics/management/commands/analyze_user_activity.py +++ b/analytics/management/commands/analyze_user_activity.py @@ -44,7 +44,7 @@ It will correctly not count server-initiated reloads in the activity statistics. The duration flag can be used to control how many days to show usage duration for -Usage: python2.7 manage.py analyze_user_activity [--realm=zulip.com] [--date=2013-09-10] [--duration=1] +Usage: python 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""" diff --git a/analytics/management/commands/client_activity.py b/analytics/management/commands/client_activity.py index 96e6cbc27e..acf1177a75 100644 --- a/analytics/management/commands/client_activity.py +++ b/analytics/management/commands/client_activity.py @@ -14,9 +14,9 @@ class Command(BaseCommand): Usage examples: -python2.7 manage.py client_activity -python2.7 manage.py client_activity zulip.com -python2.7 manage.py client_activity jesstess@zulip.com""" +python manage.py client_activity +python manage.py client_activity zulip.com +python manage.py client_activity jesstess@zulip.com""" def add_arguments(self, parser): parser.add_argument('arg', metavar='', type=str, nargs='?', default=None, diff --git a/api/integrations/perforce/git_p4.py b/api/integrations/perforce/git_p4.py index b76451cfaf..69b1646a86 100644 --- a/api/integrations/perforce/git_p4.py +++ b/api/integrations/perforce/git_p4.py @@ -33,7 +33,7 @@ import stat try: from subprocess import CalledProcessError except ImportError: - # from python2.7:subprocess.py + # from python:subprocess.py # Exception classes used by this module. class CalledProcessError(Exception): """This exception is raised when a process run by check_call() returns diff --git a/bots/irc-mirror.py b/bots/irc-mirror.py index 3e5aa2448e..6f643e172b 100644 --- a/bots/irc-mirror.py +++ b/bots/irc-mirror.py @@ -93,11 +93,11 @@ class IRCBot(irc.bot.SingleServerIRCBot): return self.dcc_connect(address, port) -usage = """python2.7 irc-mirror.py --server=IRC_SERVER --channel= --nick-prefix= [optional args] +usage = """python irc-mirror.py --server=IRC_SERVER --channel= --nick-prefix= [optional args] Example: -python2.7 irc-mirror.py --irc-server=127.0.0.1 --channel='#test' --nick-prefix=username +python irc-mirror.py --irc-server=127.0.0.1 --channel='#test' --nick-prefix=username --site=https://zulip.example.com --user=irc-bot@example.com --api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx diff --git a/puppet/zulip/files/cron.d/send-digest-emails b/puppet/zulip/files/cron.d/send-digest-emails index ed86294324..4e31edc800 100644 --- a/puppet/zulip/files/cron.d/send-digest-emails +++ b/puppet/zulip/files/cron.d/send-digest-emails @@ -1,4 +1,4 @@ MAILTO=root # Send digest emails once a day. Time is in UTC. -0 18 * * * zulip cd /home/zulip/deployments/current && python2.7 manage.py enqueue_digest_emails +0 18 * * * zulip cd /home/zulip/deployments/current && python manage.py enqueue_digest_emails diff --git a/puppet/zulip/files/supervisor/conf.d/zulip.conf b/puppet/zulip/files/supervisor/conf.d/zulip.conf index 2d90e90307..77d97949ff 100644 --- a/puppet/zulip/files/supervisor/conf.d/zulip.conf +++ b/puppet/zulip/files/supervisor/conf.d/zulip.conf @@ -8,7 +8,7 @@ ; variables can be expanded using this syntax: "%(ENV_HOME)s". [fcgi-program:zulip-django] -command=python2.7 /home/zulip/deployments/current/manage.py runfcgi daemonize=False maxchildren=20 ; the program (relative uses PATH, can take args) +command=python /home/zulip/deployments/current/manage.py runfcgi daemonize=False maxchildren=20 ; the program (relative uses PATH, can take args) ;process_name=%(program_name)s ; process_name expr (default %(program_name)s) ;numprocs=1 ; number of processes copies to start (def 1) ;directory=/tmp ; directory to cwd to before exec (def no cwd) @@ -43,7 +43,7 @@ socket_owner=zulip:zulip socket_mode=0700 [program:zulip-tornado] -command=python2.7 /home/zulip/deployments/current/manage.py runtornado 127.0.0.1:9993 +command=python /home/zulip/deployments/current/manage.py runtornado 127.0.0.1:9993 priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -57,7 +57,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-user-activity] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=user_activity +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=user_activity priority=300 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -71,7 +71,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-user-activity-interval] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=user_activity_interval +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=user_activity_interval priority=300 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -85,7 +85,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-user-presence] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=user_presence +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=user_presence priority=300 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -99,7 +99,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-signups] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=signups +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=signups priority=400 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -113,7 +113,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-confirmation-emails] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=invites +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=invites priority=500 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -127,7 +127,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-missedmessage_reminders] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=missedmessage_emails +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=missedmessage_emails priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -141,7 +141,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-missedmessage_mobile_notifications] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=missedmessage_mobile_notifications +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=missedmessage_mobile_notifications priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -155,7 +155,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-slowqueries] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=slow_queries +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=slow_queries priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -169,7 +169,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-message_sender] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=message_sender --worker_num=%(process_num)s +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=message_sender --worker_num=%(process_num)s process_name=%(program_name)s-%(process_num)s priority=350 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) @@ -185,7 +185,7 @@ directory=/home/zulip/deployments/current/ numprocs=5 [program:zulip-events-feedback_messages] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=feedback_messages +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=feedback_messages priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -199,7 +199,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-error_reports] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=error_reports +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=error_reports priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -213,7 +213,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-digest_emails] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=digest_emails +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=digest_emails priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -227,7 +227,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-events-email_mirror] -command=python2.7 /home/zulip/deployments/current/manage.py process_queue --queue_name=email_mirror +command=python /home/zulip/deployments/current/manage.py process_queue --queue_name=email_mirror priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -241,7 +241,7 @@ stdout_logfile_backups=10 ; # of stdout logfile backups (default 10) directory=/home/zulip/deployments/current/ [program:zulip-deliver-enqueued-emails] -command=python2.7 /home/zulip/deployments/current/manage.py deliver_email +command=python /home/zulip/deployments/current/manage.py deliver_email priority=600 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) diff --git a/puppet/zulip_internal/files/cron.d/active-user-stats b/puppet/zulip_internal/files/cron.d/active-user-stats index 946b93f8de..f403c64f49 100644 --- a/puppet/zulip_internal/files/cron.d/active-user-stats +++ b/puppet/zulip_internal/files/cron.d/active-user-stats @@ -1,3 +1,3 @@ MAILTO=root -*/10 * * * * zulip cd /home/zulip/deployments/current && python2.7 manage.py active_user_stats +*/10 * * * * zulip cd /home/zulip/deployments/current && python manage.py active_user_stats diff --git a/puppet/zulip_internal/files/cron.d/check-apns-tokens b/puppet/zulip_internal/files/cron.d/check-apns-tokens index fffbbadfd7..c6875d5baf 100644 --- a/puppet/zulip_internal/files/cron.d/check-apns-tokens +++ b/puppet/zulip_internal/files/cron.d/check-apns-tokens @@ -1,4 +1,4 @@ MAILTO=root # Remove any stale apple device tokens from our list -0 3 * * * zulip cd /home/zulip/deployments/current && python2.7 manage.py check_apns_tokens +0 3 * * * zulip cd /home/zulip/deployments/current && python manage.py check_apns_tokens diff --git a/puppet/zulip_internal/files/cron.d/clearsessions b/puppet/zulip_internal/files/cron.d/clearsessions index df6292ea3d..e46dc75f00 100644 --- a/puppet/zulip_internal/files/cron.d/clearsessions +++ b/puppet/zulip_internal/files/cron.d/clearsessions @@ -1,4 +1,4 @@ MAILTO=root # Clear all expired Django sessions at 10:22 PM every day. -22 22 * * * zulip cd /home/zulip/deployments/current && python2.7 manage.py clearsessions +22 22 * * * zulip cd /home/zulip/deployments/current && python manage.py clearsessions diff --git a/puppet/zulip_internal/files/supervisor/conf.d/stats.conf b/puppet/zulip_internal/files/supervisor/conf.d/stats.conf index 02fe67110f..6f041bfcbd 100644 --- a/puppet/zulip_internal/files/supervisor/conf.d/stats.conf +++ b/puppet/zulip_internal/files/supervisor/conf.d/stats.conf @@ -3,7 +3,7 @@ [program:zulip-carbon-cache] -command=python2.7 /opt/graphite/bin/carbon-cache.py --debug start +command=python /opt/graphite/bin/carbon-cache.py --debug start priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) @@ -15,7 +15,7 @@ stdout_logfile=/var/log/zulip/carbon-cache.log ; stdout log path, NONE f directory=/home/zulip/ [program:zulip-carbon-aggregator] -command=python2.7 /opt/graphite/bin/carbon-aggregator.py --debug start +command=python /opt/graphite/bin/carbon-aggregator.py --debug start priority=200 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; whether/when to restart (default: unexpected) diff --git a/scripts/restart-server b/scripts/restart-server index 9eeddd784d..43dbf1f8b6 100755 --- a/scripts/restart-server +++ b/scripts/restart-server @@ -21,10 +21,10 @@ if pwd.getpwuid(os.getuid())[0] != "zulip": sys.exit(1) # Send a statsd event on restarting the server -subprocess.check_call(["python2.7", "./manage.py", "send_stats", "incr", "events.server_restart", str(int(time.time()))]) +subprocess.check_call(["python", "./manage.py", "send_stats", "incr", "events.server_restart", str(int(time.time()))]) logging.info("Filling memcached caches") -subprocess.check_call(["python2.7", "./manage.py", "fill_memcached_caches"]) +subprocess.check_call(["python", "./manage.py", "fill_memcached_caches"]) # Restart the FastCGI and related processes via supervisorctl. logging.info("Stopping workers") diff --git a/scripts/setup/initialize-database b/scripts/setup/initialize-database index 031a73eea8..49e75f07e7 100755 --- a/scripts/setup/initialize-database +++ b/scripts/setup/initialize-database @@ -4,12 +4,12 @@ set -xe # Change to root directory of the checkout that we're running from cd "$(dirname "$0")/../.." -python2.7 manage.py checkconfig +python manage.py checkconfig -python2.7 manage.py migrate --noinput -python2.7 manage.py createcachetable third_party_api_results +python manage.py migrate --noinput +python manage.py createcachetable third_party_api_results -if ! python2.7 manage.py initialize_voyager_db; then +if ! python manage.py initialize_voyager_db; then set +x echo echo -e "\033[32mPopulating default database failed." diff --git a/templates/zerver/api.html b/templates/zerver/api.html index 7e87bcf4cd..98539ad0c0 100644 --- a/templates/zerver/api.html +++ b/templates/zerver/api.html @@ -65,7 +65,7 @@ to pull out the resulting HTML :)
-
#!/usr/bin/env python2.7
+
#!/usr/bin/env python
 
 import zulip
 import sys
diff --git a/zerver/lib/test_runner.py b/zerver/lib/test_runner.py
index e989cdc844..25a38d9e59 100644
--- a/zerver/lib/test_runner.py
+++ b/zerver/lib/test_runner.py
@@ -75,7 +75,7 @@ def run_test(test):
             print("Actual test to be run is %s, but import failed." % (actual_test_name,))
             print("Importing test module directly to generate clearer traceback:")
             try:
-                command = ["python2.7", "-c", "import %s" % (actual_test_name,)]
+                command = ["python", "-c", "import %s" % (actual_test_name,)]
                 print("Import test command: `%s`" % (' '.join(command),))
                 subprocess.check_call(command)
             except subprocess.CalledProcessError:
diff --git a/zerver/management/commands/create_realm.py b/zerver/management/commands/create_realm.py
index 32c6d4c425..cacf9d4e49 100644
--- a/zerver/management/commands/create_realm.py
+++ b/zerver/management/commands/create_realm.py
@@ -16,7 +16,7 @@ import sys
 class Command(BaseCommand):
     help = """Create a realm for the specified domain.
 
-Usage: python2.7 manage.py create_realm --domain=foo.com --name='Foo, Inc.'"""
+Usage: python manage.py create_realm --domain=foo.com --name='Foo, Inc.'"""
 
     option_list = BaseCommand.option_list + (
         make_option('-o', '--open-realm',
@@ -58,12 +58,12 @@ Usage: python2.7 manage.py create_realm --domain=foo.com --name='Foo, Inc.'"""
     def handle(self, *args, **options):
         if options["domain"] is None or options["name"] is None:
             print("\033[1;31mPlease provide both a domain and name.\033[0m\n", file=sys.stderr)
-            self.print_help("python2.7 manage.py", "create_realm")
+            self.print_help("python manage.py", "create_realm")
             exit(1)
 
         if options["open_realm"] and options["deployment_id"] is not None:
             print("\033[1;31mExternal deployments cannot be open realms.\033[0m\n", file=sys.stderr)
-            self.print_help("python2.7 manage.py", "create_realm")
+            self.print_help("python manage.py", "create_realm")
             exit(1)
         if options["deployment_id"] is not None and settings.VOYAGER:
             print("\033[1;31mExternal deployments are not supported on voyager deployments.\033[0m\n", file=sys.stderr)
diff --git a/zerver/management/commands/email-mirror.py b/zerver/management/commands/email-mirror.py
index f02e08f448..986ce64bb7 100755
--- a/zerver/management/commands/email-mirror.py
+++ b/zerver/management/commands/email-mirror.py
@@ -29,7 +29,7 @@ This script can be used via two mechanisms:
      environment variable.
 
      In Postfix, you can express that via an /etc/aliases entry like this:
-         |/usr/bin/env python2.7 /home/zulip/deployments/current/manage.py email-mirror
+         |/usr/bin/env python /home/zulip/deployments/current/manage.py email-mirror
 """
 
 
diff --git a/zerver/management/commands/import_dump.py b/zerver/management/commands/import_dump.py
index 9c194a58f1..46e5b9611f 100644
--- a/zerver/management/commands/import_dump.py
+++ b/zerver/management/commands/import_dump.py
@@ -23,7 +23,7 @@ class Command(BaseCommand):
 This command should be used only on a newly created, empty Zulip instance to
 import a database dump from one or more JSON files.
 
-Usage: python2.7 manage.py import_dump [--destroy-rebuild-database] [--chunk-size=%s]  [...]""" % (DEFAULT_CHUNK_SIZE,)
+Usage: python manage.py import_dump [--destroy-rebuild-database] [--chunk-size=%s]  [...]""" % (DEFAULT_CHUNK_SIZE,)
 
     option_list = BaseCommand.option_list + (
         make_option('--destroy-rebuild-database',
diff --git a/zerver/management/commands/print_email_delivery_backlog.py b/zerver/management/commands/print_email_delivery_backlog.py
index ecd612d57e..fd89e45dce 100755
--- a/zerver/management/commands/print_email_delivery_backlog.py
+++ b/zerver/management/commands/print_email_delivery_backlog.py
@@ -21,7 +21,7 @@ class Command(BaseCommand):
 This is run as part of the nagios health check for the deliver_email command.
 Please note that this is only relevant to the SMTP-based email delivery (no Mandrill).
 
-Usage: python2.7 manage.py print_email_delivery_backlog
+Usage: python manage.py print_email_delivery_backlog
 """
 
     def handle(self, *args, **options):
diff --git a/zerver/management/commands/realm_emoji.py b/zerver/management/commands/realm_emoji.py
index 3f168b389a..c81c562883 100644
--- a/zerver/management/commands/realm_emoji.py
+++ b/zerver/management/commands/realm_emoji.py
@@ -10,9 +10,9 @@ import six
 class Command(BaseCommand):
     help = """Manage emoji for the specified realm
 
-Example: python2.7 manage.py realm_emoji --realm=zulip.com --op=add robotheart  https://humbug-user-avatars.s3.amazonaws.com/95ffa70fe0e7aea3c052ba91b38a28d8779f5705
-Example: python2.7 manage.py realm_emoji --realm=zulip.com --op=remove robotheart
-Example: python2.7 manage.py realm_emoji --realm=zulip.com --op=show
+Example: python manage.py realm_emoji --realm=zulip.com --op=add robotheart  https://humbug-user-avatars.s3.amazonaws.com/95ffa70fe0e7aea3c052ba91b38a28d8779f5705
+Example: python manage.py realm_emoji --realm=zulip.com --op=remove robotheart
+Example: python manage.py realm_emoji --realm=zulip.com --op=show
 """
 
     def add_arguments(self, parser):
@@ -40,13 +40,13 @@ Example: python2.7 manage.py realm_emoji --realm=zulip.com --op=show
 
         name = options['name']
         if name is None:
-            self.print_help("python2.7 manage.py", "realm_emoji")
+            self.print_help("python manage.py", "realm_emoji")
             sys.exit(1)
 
         if options["op"] == "add":
             img_url = options['img_url']
             if img_url is None:
-                self.print_help("python2.7 manage.py", "realm_emoji")
+                self.print_help("python manage.py", "realm_emoji")
                 sys.exit(1)
             check_add_realm_emoji(realm, name, img_url)
             sys.exit(0)
@@ -54,5 +54,5 @@ Example: python2.7 manage.py realm_emoji --realm=zulip.com --op=show
             do_remove_realm_emoji(realm, name)
             sys.exit(0)
         else:
-            self.print_help("python2.7 manage.py", "realm_emoji")
+            self.print_help("python manage.py", "realm_emoji")
             sys.exit(1)
diff --git a/zerver/management/commands/realm_filters.py b/zerver/management/commands/realm_filters.py
index 3ebd74a423..ba7dd79e3e 100644
--- a/zerver/management/commands/realm_filters.py
+++ b/zerver/management/commands/realm_filters.py
@@ -16,9 +16,9 @@ NOTE: Regexes must be simple enough that they can be easily translated to JavaSc
       * Named groups will be converted to numbered groups automatically
       * Inline-regex flags will be stripped, and where possible translated to RegExp-wide flags
 
-Example: python2.7 manage.py realm_filters --realm=zulip.com --op=add '#(?P[0-9]{2,8})' 'https://trac.humbughq.com/ticket/%(id)s'
-Example: python2.7 manage.py realm_filters --realm=zulip.com --op=remove '#(?P[0-9]{2,8})'
-Example: python2.7 manage.py realm_filters --realm=zulip.com --op=show
+Example: python manage.py realm_filters --realm=zulip.com --op=add '#(?P[0-9]{2,8})' 'https://trac.humbughq.com/ticket/%(id)s'
+Example: python manage.py realm_filters --realm=zulip.com --op=remove '#(?P[0-9]{2,8})'
+Example: python manage.py realm_filters --realm=zulip.com --op=show
 """
 
     def add_arguments(self, parser):
@@ -45,13 +45,13 @@ Example: python2.7 manage.py realm_filters --realm=zulip.com --op=show
 
         pattern = options['pattern']
         if not pattern:
-            self.print_help("python2.7 manage.py", "realm_filters")
+            self.print_help("python manage.py", "realm_filters")
             sys.exit(1)
 
         if options["op"] == "add":
             url_format_string = options['url_format_string']
             if not url_format_string:
-                self.print_help("python2.7 manage.py", "realm_filters")
+                self.print_help("python manage.py", "realm_filters")
                 sys.exit(1)
             do_add_realm_filter(realm, pattern, url_format_string)
             sys.exit(0)
@@ -59,5 +59,5 @@ Example: python2.7 manage.py realm_filters --realm=zulip.com --op=show
             do_remove_realm_filter(realm, pattern)
             sys.exit(0)
         else:
-            self.print_help("python2.7 manage.py", "realm_filters")
+            self.print_help("python manage.py", "realm_filters")
             sys.exit(1)
diff --git a/zerver/management/commands/remove_users_from_stream.py b/zerver/management/commands/remove_users_from_stream.py
index 6eb8967148..e82eca6fce 100644
--- a/zerver/management/commands/remove_users_from_stream.py
+++ b/zerver/management/commands/remove_users_from_stream.py
@@ -35,7 +35,7 @@ class Command(BaseCommand):
     def handle(self, **options):
         if options["domain"] is None or options["stream"] is None or \
                 (options["users"] is None and options["all_users"] is None):
-            self.print_help("python2.7 manage.py", "remove_users_from_stream")
+            self.print_help("python manage.py", "remove_users_from_stream")
             exit(1)
 
         realm = get_realm(options["domain"])
diff --git a/zerver/management/commands/set_default_streams.py b/zerver/management/commands/set_default_streams.py
index 63f7200e06..19a1da1e17 100644
--- a/zerver/management/commands/set_default_streams.py
+++ b/zerver/management/commands/set_default_streams.py
@@ -19,9 +19,9 @@ streams.
 
 For example:
 
-python2.7 manage.py set_default_streams --domain=foo.com --streams=foo,bar,baz
-python2.7 manage.py set_default_streams --domain=foo.com --streams="foo,bar,baz with space"
-python2.7 manage.py set_default_streams --domain=foo.com --streams=
+python manage.py set_default_streams --domain=foo.com --streams=foo,bar,baz
+python manage.py set_default_streams --domain=foo.com --streams="foo,bar,baz with space"
+python manage.py set_default_streams --domain=foo.com --streams=
 """
 
     option_list = BaseCommand.option_list + (
diff --git a/zilencer/management/commands/create_deployment.py b/zilencer/management/commands/create_deployment.py
index 82d2cdabd1..24af863476 100644
--- a/zilencer/management/commands/create_deployment.py
+++ b/zilencer/management/commands/create_deployment.py
@@ -33,7 +33,7 @@ class Command(BaseCommand):
     def handle(self, *args, **options):
         if None in (options["api"], options["web"], options["domain"]):
             print("\033[1;31mYou must provide a domain, an API URL, and a web URL.\033[0m\n", file=sys.stderr)
-            self.print_help("python2.7 manage.py", "create_realm")
+            self.print_help("python manage.py", "create_realm")
             exit(1)
 
         if not options["no_realm"]:
diff --git a/zilencer/management/commands/render_old_messages.py b/zilencer/management/commands/render_old_messages.py
index 95b622e34f..fbcf2f4e28 100644
--- a/zilencer/management/commands/render_old_messages.py
+++ b/zilencer/management/commands/render_old_messages.py
@@ -10,7 +10,7 @@ import time
 class Command(BaseCommand):
     help = """Render all historical messages that haven't been rendered yet.
 
-Usage: python2.7 manage.py render_old_messages"""
+Usage: python manage.py render_old_messages"""
 
     def handle(self, *args, **options):
         total_rendered = 0