def get_devmm(name):
 name = os.path.expanduser(name)
 if (is_chrdev(name) or is_blkdev(name)):
  stat_structure = os.stat(name)
  return (os.major(stat_structure.st_rdev), os.minor(stat_structure.st_rdev))
 else:
  return (0, 0)

def get_devmm ( name ) : name = os . path . expanduser ( name ) if ( is_chrdev ( name ) or is_blkdev ( name ) ) : stat_structure = os . stat ( name ) return ( os . major ( stat_structure . st_rdev ) , os . minor ( stat_structure . st_rdev ) ) else : return ( 0 , 0 )
get major/minor info from a device cli example: .