OS module

The OS module provides instance methods and properties related to the operating system

Some common methods and objects

  1. os.cpus()Gets the logical CPU information of the system, returning an array
  2. os.hostname()Get native name
  3. os.homedir()Gets the local user directory
  4. os.networkInterfaces()Obtain the IP address of the host
  5. os.tmpdir()Gets the system’s temporary folder path
  6. os.totalmem()Gets the total memory size of the system
  7. os.userInfo()Obtaining user information includes the current user name and shell