def do_about(self, line): print \ """ PubBib - version %s Git commit: %s Copyright (C) 2011 Andrew McArdle ([email protected]) https://github.com/andrewmcardle/PubBib 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/>. """ % (version(), git_describe())
import logging import multiprocessing if __name__ == '__main__': multiprocessing.freeze_support() #Logging Setup logger = logging.getLogger() logger.setLevel(logging.DEBUG) file_handler = logging.FileHandler('Log.txt', mode = 'w') file_handler.setLevel(logging.DEBUG) console_handler = logging.StreamHandler() console_handler.setLevel(logging.ERROR) formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s') file_handler.setFormatter(formatter) console_handler.setFormatter(formatter) logger.addHandler(file_handler) logger.addHandler(console_handler) logger.info("Version: %s", version.version()) logger.info("Describe: %s", version.git_describe()) try: command_line.Command_Processor().cmdloop() except Exception, e: logger.exception("Exception: %s", e) raise