-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getOperators() doesn't work with Python from within Cygwin on Windows #14
Comments
Hi! thx in advance |
Thanks for your quick reply! I Installed the 1.3.4 package from Anaconda (btw, the
The same is true for the 1.9.0 binary. |
Ah, now I see. I though you would use the latest release, which has other problems concerning the operator listing. I guess, the problem does not occur if you hard-code the separator to '\n'. the listing given by CDO itself does not make use of '\r\n' at all. I think the use of 'os.linesep' might have been a really bad type of optimization. |
Some recent testing of the current release 1.4.0 did not reveal this behavior - so I think the ticket can be closed. @andreas-h |
For Windows there are Cygwin64 CDO binaries available. When trying to use these I have the problem that the
getOperators()
function doesn't work properly. The culprit seems to be that the output ofcdo --operators
is being split atos.linesep
(see, e.g., https://github.com/Try2Code/cdo-bindings/blob/master/python/cdo.py#L305). However,os.linesep
on Windows is\r\n
, while the output of thecdo --operators
call is only separated by\n
.I guess it should be possible to use something like (pseudo-code)
and then use
cdosep
instead ofos.linesep
.Would you be open to a PR implementing this?
The text was updated successfully, but these errors were encountered: