Skip to content
Advertisement

Tag: pythonpath

Add directory to PATH inside a Python script such that a third-party module can find a DLL with ctypes find_library

Let’s say a third-party module moduleXYZ.py (that I don’t want to fork/modify) does: In my code main.py I’m importing it with This DLL is in C:Program Filesgsgs9.56.1bin which is not in my global system path. Question: how to add this directory to the path (for the duration of the script run, not permanently for the system) from inside my script

Advertisement