You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logic analyser running on a windows machine,
From a linux machine:
import saleae
la = saleae.Saleae("hostname")
la.save_to_file('c:/test_file.logicdata')
la.load_from_file('c:/test_file.logicdata')
doesn't work.
The same does work on a windows machine.
I believe this is because in linux, os.path.abspath('c:/test_file.logicdata')
returns /current/linux/working/directory/C:/test_file.logicdata
Would using os.path.normpath() work better here?
The text was updated successfully, but these errors were encountered:
Not quite like that unfortunately. normpath alone is insufficient, it would need to be basically what's suggested in the python docs of normpath(join(os.getcwd(), path)).
The deeper problem here is that Logic doesn't support relative paths, so we have to convert to an absolute path. The rules for path manipulation will come from the os module where the Python script is running. If Logic is running on a different operating system, this module would have to be told that somehow (I don't believe there is a is an absolute path on any operating system function we can call).
ppannuto
changed the title
can't save_to_file and load_from_file from linux when logic analyser is running on windows
Path manipulation doesn't work when Logic is running on different OS than the Python module
Jul 10, 2020
Logic analyser running on a windows machine,
From a linux machine:
doesn't work.
The same does work on a windows machine.
I believe this is because in linux,
os.path.abspath('c:/test_file.logicdata')
returns
/current/linux/working/directory/C:/test_file.logicdata
Would using os.path.normpath() work better here?
The text was updated successfully, but these errors were encountered: