The official documentation mentions this parameter but says nothing about possible values.
Is it necessary to use Operating System
key in classifiers
?
Well its not needed every time. But if you are doing something w.r.t platform and you don't intend to support all platforms in your program, then you need to base your program on platform.
Following are the os names that are currently registered in python
'posix', 'nt', 'os2', 'ce', 'java', 'riscos'
sys.builtin_module_names will list all the platforms that your python version supports. Again it will bring the modules based on your platform during installation.
you can base your program based on os.name
if os.name == 'nt':
# do something for Windows
elif os.name == 'posix':
# do something for all Linux and Mac platforms
elif os.name == 'os2':
# do something
elif os.name == 'ce':
# do something
elif os.name == 'java':
# do something for java based platforms
elif os.name == 'riscos':
# do something
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