Help me... test a script to grab user system info

Hello,

I’m in need of getting the right operating system, version number, and build number of the users system (don’t have to ask why). So i made a small script to grab this info, but my problem is… how accurate is the platform module, does it return the right info for every system, etc…?

I used to use import sys instead, this caused me to write dicts, loops and all sorts to get the right information on the display, i found out that platform works much friendlier, but i’m not sure if it’s as good as or even better then the sys module.

So my question is could you try this script out and tell me if it gave you the right information about your system?


import platform


def get_operating_system():


    operating_system    = platform.system()
    system_version      = platform.release()
    bit_type            = platform.machine()
    build_version       = platform.platform()


    print( 'Operating system: ' + operating_system + ' ' + system_version + '
Bit type: ' + bit_type + '
Build version: ' + build_version)



Always->python->module mode->name_of_the_script.get_operating_system

Output that it should give (my output):

  • Operating system: Windows 10
  • Bit type: AMD64
  • Build version: Windows-10-10.0.16299

So i know it works on windows 10, if anyone could test it on any other system and report the results inhere, i would be a happy man.

Thank you for your time.

Hellooo,

used UPBGE on Win7, it looks fine :

  • Operating system: Windows 7
  • Bit type: AMD64
  • Build version: Windows-7-6.1.7601-SP1

Good luck !

Hi!
I do not know why you need this shit, but please:

Blender Game Engine Started
Operating system: Linux 4.13.0-38-generic
Bit type: x86_64
Build version: Linux-4.13.0-38-generic-x86_64-with-debian-stretch-sid
Blender Game Engine Finished

Do not worry, be happy … :cool:

I do not know why you need this shit

i don’t need shit either, the toilet wants it!

It’s to see what data every operating system returns so that i can work with it.
If anyone could test it on a mac, i would like to have that data as well, thank you.

Thanks guys


Operating system: Linux 4.16.3-1-ARCH
Bit type: x86_64
Build version: Linux-4.16.3-1-ARCH-x86_64-with-arch-Arch-Linux

One of the good things about python is that it is cross platform, so it probably works fine on a mac.

You can also get the machine network name with platform.node(), and there are other functions for getting the current username…

it should work fine on mac indeed, but it’s not about if it works on a mac but what the return values are. I need to split a few strings in order to get the data i want, but before i can do that, i need to know how the return string looks like for every system type.

I know about the other platform options but that is not needed, well maybe i’ll add them to but for now os, bit type and build is enough. (i don’t want the player to freak out, thinking wtf how did that game get all that data?, what is it doing with it?, etc.).

Thanks