Using PlatformInfo
Prerequisites:
- PlatformInfo installed (see previous guide).
- If you are downloading PlatformInfo.py manually, please place the file in the same folder as your code
- If you are using pip or the wheel from PyPi/GitHub, you are good to go!
Importing PlatformInfo and initializing a Platform
To import PlatformInfo, add import platforminfo to the top of your code.
To initialize PlatformInfo, create a new Platform object. To do this, assign platforminfo.Platform() to a variable. This runs a quick platform check (to allow the code to determine stats such as kernel version and OS version without checking the platform every time).