diff --git a/liesl/files/labrecorder/cli_wrapper.py b/liesl/files/labrecorder/cli_wrapper.py index 9f79530..cfe8209 100644 --- a/liesl/files/labrecorder/cli_wrapper.py +++ b/liesl/files/labrecorder/cli_wrapper.py @@ -103,36 +103,22 @@ def start_recording( filename = Run(filename) filename.parent.mkdir(exist_ok=True, parents=True) - if "win" in sys.platform: - # start encoding the command - streams = [] - for idx, uid in enumerate(self.streamargs): - stream = '"' - prt = f"source_id='{uid}'" - stream += prt - stream += '"' - streams.append(stream) - - cmd = " ".join((str(self.cmd), str(filename), *streams)) - # print(cmd) - # start the recording process + # start encoding the command + streams = [] + for idx, uid in enumerate(self.streamargs): + stream = '"' + prt = f"source_id='{uid}'" + stream += prt + stream += '"' + streams.append(stream) + + cmd = " ".join((str(self.cmd), str(filename), *streams)) + if "win" in sys.platform: self.process = Popen( cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE, bufsize=1, ) else: # linux - streams = [] - for idx, uid in enumerate(self.streamargs): - stream = '"' - prt = f"source_id='{uid}'" - stream += prt - stream += '"' - streams.append(stream) - cmd = [str(self.cmd), str(filename), *streams] - cmd = " ".join((str(self.cmd), str(filename))) - for s in streams: - cmd += f" {s}" - print(cmd) self.process = Popen( cmd, stdin=PIPE, diff --git a/requirements.txt b/requirements.txt index ea3cae4..5bef72c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -pylsl -pyxdf +pylsl==1.14 +pyxdf==1.16.3 numpy \ No newline at end of file diff --git a/setup.py b/setup.py index a04e4ad..34fe82d 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name="liesl", - version="0.3.4.7", + version="0.3.4.8", description="Toolbox to receive and process LSL streams and handle XDF files.", long_description=long_description, long_description_content_type="text/markdown", diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index 2805991..12650c4 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -21,9 +21,10 @@ def test_cli_xdf(xdf_file): stderr=PIPE, ) o, e = p.communicate() - assert f"Loading {xdf_file}" in o.decode() - assert "Liesl-Mock-EEG" in o.decode() - assert "Liesl-Mock-Marker" in o.decode() + out = o.decode() + assert f"Loading {xdf_file}" in out + assert "Liesl-Mock-EEG" in out + assert "Liesl-Mock-Marker" in out @pytest.mark.skipif(