Issue
As the title says, how can I find the current operating system in python?
Solution
I usually use sys.platform to get the platform. sys.platform will distinguish between linux, other unixes, and OS X, while os.name is "posix" for all of them.
For much more detailed information, use the platform module. This has cross-platform functions that will give you information on the machine architecture, OS and OS version, version of Python, etc. Also it has os-specific functions to get things like the particular linux distribution.
Answered By - dF. Answer Checked By - Cary Denson (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.