I have solved my problem. The problem was because dwf was not properly installed in the library library in my mac. here is my solution:
1.
Download the WaveForms software from the Digilent website, which contains the latest version of the dwf library.
You can download the WaveForms software from the following website:
https://reference.digilentinc.com/reference/software/waveforms/waveforms-3/start
On this page, select your operating system (Mac) and WaveForms version (WaveForms 3). Then, agree to Digilent's license agreement and provide your email address. You will receive an email with a download link.
2.
Extract the downloaded WaveForms software package.
3.
Open the terminal and navigate to the extracted WaveForms software package directory.
4.
Enter the frameworks subdirectory, which contains the dwf library files.
bashCopy code:
cd WaveForms.app/Contents/Frameworks
5.
Copy the dwf library to the system-level Frameworks directory.
bashCopy code
sudo cp -R dwf.framework /Library/Frameworks/
This command will copy the dwf.framework directory and its files to the /Library/Frameworks directory, which is typically used for system-level libraries and programs.
6.
Set permissions for the dwf library files.
bashCopy code
sudo chmod -R 755 /Library/Frameworks/dwf.framework
This command will modify the permissions of the dwf library files to ensure that other users can read and execute them.
7.
Verify that the dwf library is installed successfully.
Enter the following command in the terminal:
bashCopy code
ls /Library/Frameworks/dwf.framework
If the output contains the dwf file, it means that the dwf library has been installed successfully.
8. Use "self.dwf = cdll.LoadLibrary("/Library/Frameworks/dwf.framework/dwf")" to connect device(Python).
Hope that helpful!!
Thx