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 — codeql/python/extractor/python_tracer.py at codeql-cli/v2.27.2 · github/codeql Expand file tree/ Copy pathpython_tracer.pyMore file actions executable file ·53 lines (46 loc) · 1.64 KB / Copy pathpython_tracer.pyFile metadata and controlsexecutable file ·53 lines (46 loc) · 1.64 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 #!/usr/bin/env python #This file needs to be able to handle all versions of Python we are likely to encounter #Which is probably 2.6 and upwards '''This module sets up sys.path from the environment and runs the populator when called from semmle tools such as buildSnapshot.''' import sys import os # The constant is put here instead of make_zips.py, since make_zips.py is not present in # the distributed extractor-python code def getzipfilename(): return 'python3src.zip' def load_library(): try: tools = os.environ['ODASA_TOOLS'] except KeyError: try: tools = os.path.join(os.environ['SEMMLE_DIST'], "tools") except KeyError: tools = sys.path[0] try: zippath = os.path.join(tools, getzipfilename()) sys.path = [ zippath ] + sys.path except Exception: #Failed to find tools. Error is reported below zippath = tools try: import semmle.populator except ImportError as ex: print("FATAL ERROR: ") print(ex) if tools is not None: if not os.path.exists(os.path.join(tools, getzipfilename())): sys.stderr.write("No tracer library found in " + tools + "\n") else: sys.stderr.write("Unable to load tracer library at %s:\n" % zippath) import traceback traceback.print_exc(file=sys.stderr) else: print(sys.path) sys.stderr.write("Cannot find Semmle tools\n") sys.exit(2) if __name__ == "__main__": original_path = sys.path load_library() import semmle.populator semmle.populator.main(original_path) |
| You are visitor 01402503 — 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. |