GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — foy-python-handler/foy_python/cli.py at master · freshdated/foy-python-handler Expand file tree/ Copy pathcli.pyMore file actions 31 lines (25 loc) · 1.08 KB / Copy pathcli.pyFile metadata and controls31 lines (25 loc) · 1.08 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 import argparse import logging from foy_python import check_pypi_for_updates from foy_python import requirements_parser def main(): parser = argparse.ArgumentParser("Fountain of Youth's python handler for Pypi packages") parser.add_argument('-R', '--requirements', dest="file", help="""Get packages and versions from requirements.txt file. Usage foy.python -R <file_path>""") parser.add_argument('-C', '--check', dest="package", help="""Get some package's latest avaliable version. Usage foy.python -V <package_name>""") args = parser.parse_args() if args.file: requirements_parser(args.file) if args.package: check_pypi_for_updates(args.package) def get_logger(log_path): handler = logging.StreamHandler() if log_path is None else logging.FileHandler(log_path) formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') handler.setFormatter(formatter) logger = logging.getLogger("foy_python") logger.addHandler(handler) logger.setLevel(logging.DEBUG) return logger if __name__ == '__main__': main() |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |