When to use os.name, sys.platform, or platform.system? suggests that os.name
might be 'nt'
.
Reliably detect Windows in Python suggests that os.name
is 'posix'
.
Is it 'posix'
or 'nt'
?
When to use os.name, sys.platform, or platform.system? suggests that os.name
might be 'nt'
.
Reliably detect Windows in Python suggests that os.name
is 'posix'
.
Is it 'posix'
or 'nt'
?
On Cygwin64,
import os; print os.name;
import sys; print sys.platform;
import platform; print platform.system()
yields:
posix
cygwin
CYGWIN_NT-6.1