lucask07 / covg_fpga

FPGA and Python experiment code for the digital ion channel amplifier project.
GNU General Public License v3.0
6 stars 2 forks source link

Add MAC frontpanel setup to interfaces.py #16

Closed lucask07 closed 2 years ago

lucask07 commented 2 years ago

To allow Python to import the ok module on MAC change the interfaces.py file to:

# TODO: make sure this path works for Windows, Mac, and Linux: https://docs.opalkelly.com/fpsdk/frontpanel-api/programming-languages/
if sys.platform == 'win32':
    sys.path.append(os.path.join(configs['frontpanel_path'], 'API/Python/3.7/x64')) # Add path to ok.py to PATH for import
    os.add_dll_directory(os.path.join(configs['frontpanel_path'], 'API/lib/x64'))   # Make DLL (okFrontPanel.dll) available
elif sys.platform == 'darwin':
    sys.path.append(os.path.join(configs['frontpanel_path'], 'API/Python3/')) # Add _ok.so to PATH for import
Ajstros commented 2 years ago

Fixed with #12