ctt/bin/ctt

39 lines
1.2 KiB
Python
Executable File

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# 2013 Nico Schottelius (nico-ctt at schottelius.org)
#
# This file is part of ctt.
#
# ctt is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ctt is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ctt. If not, see <http://www.gnu.org/licenses/>.
#
#
import os
import subprocess
import sys
if __name__ == "__main__":
# Ensure our /lib/ is included into PYTHON_PATH
here = os.path.dirname(os.path.realpath(__file__))
lib = os.path.abspath(os.path.join(here, '../lib'))
ctt_argv = [os.path.abspath(os.path.join(here, '../scripts/ctt'))]
orig_pythonpath = os.getenv('PYTHONPATH', "")
pythonpath = "%s:%s" % (lib, orig_pythonpath)
os.environ['PYTHONPATH'] = pythonpath
ctt_argv.extend(sys.argv[1:])
subprocess.call(ctt_argv)