How to determin the underlying OS, jython is running on. Not 'java', but 'nt' or 'posix'.
For jython I use java.lang.System.getProperty("os.name")
:
import sys
def get_os_version():
ver = sys.platform.lower()
if ver.startswith('java'):
import java.lang
ver = java.lang.System.getProperty("os.name").lower()
return ver
print(get_os_version())
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With