The top level attributes (
processor) are available as module globals:
if mozinfo.os == 'win': ...
In addition, mozinfo exports a dictionary,
mozinfo.info, that contain these values. mozinfo also exports:
choices: a dictionary of possible values for os, bits, and processor
main: the console_script entry point for mozinfo
unknown: a singleton denoting a value that cannot be determined
unknown has the string representation
"UNKNOWN". unknown will evaluate as
False in python:
if not mozinfo.os: ... # unknown!
MozInfo comes with a command line,
mozinfo which may be used to diagnose one's current system.
os: linux version: Ubuntu 10.10 bits: 32 processor: x86
Three of these fields, os, bits, and processor, have a finite set of choices. You may display the value of these choices using
mozinfo --bits, and
mozinfo --help documents command-line usage.