File: testprep.py

package info (click to toggle)
klayout 0.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292,204 kB
  • sloc: cpp: 2,068,428; ruby: 47,823; xml: 26,924; python: 14,404; sh: 1,812; tcl: 212; perl: 170; makefile: 112; ansic: 42
file content (11 lines) | stat: -rw-r--r-- 390 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11

import os

# Whatever drove these people to drop PATH support for Windows in Python 3.8 (bpo-36085)
# they at least had mercy and let us emulate PATH through os.add_dll_directory.

external_dll_path = os.getenv("KLAYOUT_PYMOD_DLL_PATH")
if ("add_dll_directory" in os.__dict__) and external_dll_path is not None:
  for p in external_dll_path.split(os.pathsep):
    os.add_dll_directory(p)