Created
June 15, 2016 05:29
-
-
Save bron84/b5a2b0cba4279f5d770f6e85bd2957b0 to your computer and use it in GitHub Desktop.
platform_info_mod.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import inspect, platform | |
| for name, value in inspect.getmembers(platform): | |
| if name[0] != '_' and callable(value): | |
| try: | |
| value = value() | |
| except (IndexError, TypeError): | |
| continue | |
| if str(value).strip("( ,')"): | |
| print('{:>21}() = {}'.format(name, value)) | |
| import sys | |
| print(sys.platform, sys.version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment