Path.cwd

Path.cwd(...)

Description

Documentation for Path.cwd.

Python Python Pathlib Official Docs

Real-World Examples

Practical code examples showing how Path.cwd is used in real projects.

print("BINFILE", binfile, binfolder)
    # cmd_args = [
    #     "powershell", "-Command", "Dia2Dump", "-lines", "*", f"'{binfile}'"
    # ]
    cmd = f"Dia2Dump -lines * {binfile}"
    out, _err, _exit_code = cmd_with_output(cmd, cwd=binfolder)
    file_cache = {}
    # out, _err, _exit_code = cmd_with_output(cmd_args, platform='windows')
    # print(cmd, out, _err)
    try:
        lines_notclean = out.decode().split("\r\n")
    except:
        logging.info("Dia2dump error")
        lines_notclean = []
    lines = []
    for line in lines_notclean:
        lines.append(line.strip())

    lines = []
    for line in lines_notclean:
        lines.append(line.strip())
    funcs_infos = {}
    rva_seg_length = 0
    dbg_seg_length = 0
    source_file = ""
"npm": r'"env":\s*\{|cross-env\s+\w+=|env\s+\w+=',
            "pyproject": r"\[.*env\]|env\s*=\s*\{",
            "just": r"^export\s+\w+|^\s*\w+\s*:=",
        },
    },
    "cwd": {
        "description": "Tasks that change working directory",
        "patterns": {
            "make": r"\bcd\s+\S+\s*[;&]|--directory|-C\s+\S+",
            "npm": r'"cwd":|--prefix\s+\S+',
            "pyproject": r"cwd\s*=|working_dir\s*=",
            "just": r"cd\s+\S+\s*[;&]",
        },
    },
    "parallel": {
        "description": "Tasks that run concurrently",
        "patterns": {
            "make": r"-j\s*\d*|--jobs|\.PARALLEL",
            "npm": r"concurrently|npm-run-all|run-p\s|parallel\s",
            "pyproject": r"parallel\s*=\s*true",
            "just": r"&$|parallel",
        },
    },
    "keep_going": {
        "description": "Error suppression / continue on failure",