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 — DexProtectorTool/launcher.py at main · CKAndroidProject/DexProtectorTool Expand file tree/ Copy pathlauncher.pyMore file actions 64 lines (61 loc) · 2.13 KB / Copy pathlauncher.pyFile metadata and controls64 lines (61 loc) · 2.13 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 """Keep startup failures visible and save Python/native diagnostics.""" import contextlib import faulthandler from pathlib import Path import platform import sys import tempfile import time import traceback class Tee: def __init__(self, console, log): self.console, self.log = console, log def write(self, text): self.log.write(text) self.log.flush() if self.console is not None: try: self.console.write(text) self.console.flush() except (OSError, UnicodeError): self.console = None return len(text) def flush(self): self.log.flush() if self.console is not None: try: self.console.flush() except OSError: self.console = None def run(entry=None, log_path=None): path = Path(log_path) if log_path else Path(__file__).resolve().parent/'startup.log' try: log = path.open('a',encoding='utf-8') except OSError: path = Path(tempfile.gettempdir())/'DexProtectorTool-startup.log' log = path.open('a',encoding='utf-8') with log, contextlib.redirect_stdout(Tee(sys.stdout,log)), contextlib.redirect_stderr(Tee(sys.stderr,log)): print('\n'+time.strftime('%Y-%m-%d %H:%M:%S')+' Starting DexProtectorTool') print('Python:',sys.executable) print('Version:',sys.version.split()[0], 'Bits:',64 if sys.maxsize>2**32 else 32) print('Windows/platform:',platform.platform()) print('Startup log:',path) previous = faulthandler.is_enabled() if not previous: faulthandler.enable(file=log) try: if entry is None: from app import main entry = main result = entry() print('Application closed normally.') return int(result or 0) except Exception: traceback.print_exc() print('Startup failed. Full details were saved to:',path) return 1 finally: if not previous: faulthandler.disable() if __name__=='__main__': raise SystemExit(run()) |
| You are visitor 01402792 — 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. |