(filename: str)
| 34 | |
| 35 | |
| 36 | def _read_pyvenv_cfg(filename: str) -> dict[str, str]: |
| 37 | ret = {} |
| 38 | with open(filename, encoding='UTF-8') as f: |
| 39 | for line in f: |
| 40 | try: |
| 41 | k, v = line.split('=') |
| 42 | except ValueError: # blank line / comment / etc. |
| 43 | continue |
| 44 | else: |
| 45 | ret[k.strip()] = v.strip() |
| 46 | return ret |
| 47 | |
| 48 | |
| 49 | def bin_dir(venv: str) -> str: |