summaryrefslogtreecommitdiffstats
path: root/__main__.py
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2015-04-07 18:34:48 +0200
committerJan Pokorný <jpokorny@redhat.com>2015-04-08 19:56:20 +0200
commit0f286858ec1da08effaadb36ec2a2f33614fb8be (patch)
tree20b2beb18c1ca7a24f462262278384ff6488079b /__main__.py
parenteab86dc545b7e9e346cb74a17c1b10df1cd212dc (diff)
downloadclufter-0f286858ec1da08effaadb36ec2a2f33614fb8be.tar.gz
clufter-0f286858ec1da08effaadb36ec2a2f33614fb8be.tar.xz
clufter-0f286858ec1da08effaadb36ec2a2f33614fb8be.zip
general: use python2 (sys.executable), not python (PEP 394)
Hopefully there is no major roadblock making this change unreasonable at this point in time (checked commonly used RHEL, Fedora, Debian/Ubuntu -- the latter also for seamless integration with Travis CI). Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
Diffstat (limited to '__main__.py')
-rw-r--r--__main__.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/__main__.py b/__main__.py
index 05f2781..0afbd84 100644
--- a/__main__.py
+++ b/__main__.py
@@ -1,15 +1,16 @@
# -*- coding: UTF-8 -*-
-# Copyright 2014 Red Hat, Inc.
+# Copyright 2015 Red Hat, Inc.
# Part of clufter project
# Licensed under GPLv2+ (a copy included | http://gnu.org/licenses/gpl-2.0.txt)
-"""Machinery entry point -- to be run via python -m <package>"""
+"""Machinery entry point -- to be run via python{,2} -m <package>"""
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from os.path import basename
-from sys import argv, exit
+from sys import argv, executable, exit
from .main import run
if basename(argv[0]) == '__main__.py':
- argv[0] = 'python -m ' + __package__
+ # for help screens only, hence spaces allowed
+ argv[0] = "{0} -m {1}".format(executable, __package__)
exit(run(argv))