by CodeMage · 14y ago · 0 comments
Of course, I could simply fork it, remove the "not supported on Windows" check and use it, but that feels lazy and dirty ;)
From a quick look at the code, it's not supported on windows because of its reliance on terminal utilities(pty, termios). Doesn't the banner state to use the previous version(pbs) for windows support?
https://github.com/amoffat/sh/blob/master/sh.py#L33
And if for some reason it still doesn't work out, you can always use subprocess(which this library is using anyway) or https://github.com/kennethreitz/envoy
Thanks! Like I said, I don't have lots of experience with Python, so this is very valuable info for me :)
Doesn't the banner state to use the previous version(pbs) for windows support?
Yes, but the PyPi page for pbs 0.110 states: "PBS will no longer be supported." I'm not comfortable with basing my code on a library which won't be supported in the future.
And if for some reason it still doesn't work out, you can always use subprocess(which this library is using anyway) or https://github.com/kennethreitz/envoy
I didn't know about envoy either. Thanks again! :)
EDIT: Upon closer examination, the whole OProc class depends on os.fork(), which is available only on Unix, according to Python docs.