How can I find the current OS in Python? [duplicate]

If you want user readable data but still detailed, you can use platform.platform() >>> import platform >>> platform.platform() ‘Linux-3.3.0-8.fc16.x86_64-x86_64-with-fedora-16-Verne’ platform also has some other useful methods: >>> platform.system() ‘Windows’ >>> platform.release() ‘XP’ >>> platform.version() ‘5.1.2600’ Here’s a few different possible calls you can make to identify where you are, linux_distribution and dist seem to have … Read more