def execute(self): """ 执行命令 """ args = self.argv try: subcommand = self.argv[1] except IndexError: subcommand = 'help' # Display help if no arguments were given. if subcommand == 'help' or subcommand == '--help': if len(args) <= 2: sys.stdout.write(self.main_help_text() + '\n') else: self.fetch_command(args[2]).print_help(self.prog_name, args[2]) elif subcommand == 'version' or subcommand == '--version': sys.stdout.write(get_version() + '\n') else: try: self.fetch_command(subcommand).run_from_argv(self.argv) except AssertionError: sys.stdout.write("error!\n") self.fetch_command(subcommand).print_help( self.prog_name, subcommand) exit(1)
#from .core import * from core import get_version from core import las version = get_version() HAVE_GDAL = bool(las.LAS_IsGDALEnabled()) HAVE_LIBGEOTIFF = bool(las.LAS_IsLibGeoTIFFEnabled()) import sys version = sys.version_info[:3] import file import point import header import vlr import color import srs
# -*- coding: UTF-8 -*- # Copyright (C) 2004, 2006, 2008-2009 J. David Ibáñez <*****@*****.**> # # This program 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. # # This program 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 this program. If not, see <http://www.gnu.org/licenses/>. # Import from itools from core import get_version __version__ = get_version()