Closed manuelbua closed 4 years ago
"Matching the partial "win" word will also include "darwin".
Oh shit, I never thought of this !
No intent to discard or include MacOS, my only goal is to support Linux and Windows as I don't have a MacOS machine to test: but if by some kind of fortunate magic, webscreenshot
also works on MacOS, I'm glad.
If I replace :
posix="win" not in sys.platform
posix="win32" not in sys.platform
=> Will it work on MacOS ?
Yeah that will work too as well as i've just tried it now, i moved it to an is_windows
variable only because i've seen it used at send_signal
as well.
But now i see also craft_arg
is checking that too with "win"
, (tested it now and "win32"
also works there), maybe having a global is_windows
is a better alternative?
You're right, I'll make a specific and unique function to detect Windows.
Matching the partial "win" word will also include "darwin", non-POSIX argument splitting will cause problems when spaces are encountered (such as "header=Cookie: name=value").
However i'm not sure what the original intent was here: you may wanted to include "darwin" for some reason.
I'm using the string "win32" here as it seems there are various ways to detect it: one such interesting post at StackOverflow suggest to use
platform.system()
so to check for "Windows" instead.