cdo-bindings icon indicating copy to clipboard operation
cdo-bindings copied to clipboard

signal.siginterrupt not available on windows

Open weshinsley opened this issue 11 months ago • 0 comments

On a windows system with a working latest build of cdo.exe in the path:-

Python 3.13.1 (tags/v3.13.1:0671451, Dec  3 2024, 19:06:28) [MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cdo
>>> cdo.Cdo()
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    cdo.Cdo()
    ~~~~~~~^^
  File "C:\Python313\Lib\site-packages\cdo\cdo.py", line 176, in __init__
    self.tempStore = tempStore or CdoTempfileStore(dir=tempdir)
                                  ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "C:\Python313\Lib\site-packages\cdo\cdo.py", line 830, in __init__
    signal.siginterrupt(sig, False)
    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'signal' has no attribute 'siginterrupt'

because sigintterupt on cdo.py:830 is unix-only in the signal library. Is there a workaround for this? Exploring whether we can allow users to run cdo-based jobs from python on our windows cluster.

weshinsley avatar Feb 08 '25 17:02 weshinsley