Skip to content

Commit

Permalink
switch strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
zm711 committed Feb 13, 2024
1 parent 60a6604 commit cf651e1
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions neo/rawio/plexon2rawio/pypl2/pypl2lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,22 @@
# You are free to modify or share this file, provided that the above
# copyright notice is kept intact.

from sys import platform
import platform
import subprocess
import pathlib
import warnings
import numpy as np

plataform_is_windows = platform.system() == "Windows"
platform_is_windows = platform.system() == "Windows"

if plataform_is_windows:
if platform_is_windows:
import ctypes
else:
pltaform_is_linux = platform.system() == "Linux"
if pltaform_is_linux:
try:
is_wine_available = subprocess.run(
["wine", "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False
is_wine_available = subprocess.run(
["which", "wine"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False
)
except subprocess.CalledProcessError:
raise ImportError("Wine is not installed. Please install wine to use the PL2FileReader.dll")
if is_wine_available.returncode != 0:
raise ImportError("Wine is not installed. Please install wine to use the PL2FileReader.dll")

from zugbruecke import CtypesSession

Expand Down

0 comments on commit cf651e1

Please sign in to comment.