openspyrit / spas

Single-Pixel Acquisition Software
https://spas.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
8 stars 2 forks source link

SPAS Unsupported for Linux users #6

Open atlorentemur opened 2 years ago

atlorentemur commented 2 years ago

Importing SPAS is impossible for Linux users. This is due to the use of Winreg which is not compatible with linux.

While the package is not meant to be used for Linux users to control the instrument side of things, it still is important for Linux users to be able to import it to read data/metadata etc.

Potentially isolate the use of winreg and other windows specific applications inside a "submodule" so that linux users can use some of the functions that do not control the intrumentation.

tbaudier commented 2 years ago

Same problem on macOs.

A suggestion to avoid the problem is:

import os
if os.name == 'nt':
    import ALP4
    import pyueye as ueye

In acquisition.py and metadata.py

But in metadata.py, all the ALP4 reference should be remove too. Is it possible?

nducros commented 2 years ago

Thanks Thomas! @Mahieu-Williame: ça risque de résoudre une partie de nos problèmes.