Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible values for platform.machine()

Tags:

python

platform.machine()
Returns the machine type, e.g. 'i386'. An empty string is returned if the value cannot be determined.

What are the possible values for this field?

like image 429
Jonathon Reinhart Avatar asked Jul 16 '17 04:07

Jonathon Reinhart


People also ask

What is platform machine?

A platform weighing machine means a weighing instrument with compound levers and with the goods receptacles generally in the form of a platform. 1.1.1: Platform weighing machines may be of the following capacities. 10kg, 20kg, 50kg, 100kg, 250kg, 300kg, 500kg, 1000kg, 2000kg, 3000kg, and 5000kg.

What does platform Uname do?

uname() This function returns a tuple that stores information regarding the system. Basically this function can be used to replace the individual functions to retrieve information about the system, node, release, version, machine, version and processor.

Which one of the platform module functions should be used to determine the underlying OS version?

The platform module in python provides functions that access information of the underlying platform (operating system). The platform. system() method is used to return the underlying operating system name.

Which of the following modules can output information about hardware operating system and interpreter version?

The platform module includes the tools for learning about the interpreter, operating system, and hardware platform where a program is running. The example output below was generated on a MacBook Pro3,1 running OS X 10.6.


1 Answers

On platforms with os.uname(), this information comes directly from the result of that API call. That is to say, platform.machine() returns the same thing as the uname -m command.

Thus, the answer really depends on the kernel's implementation of the uname(2) system call. For that, see this question and answer:

Possible values for `uname -m` (utsname.machine)

like image 181
Jonathon Reinhart Avatar answered Sep 17 '22 18:09

Jonathon Reinhart