| 1 | ''' |
| 2 | Number of Processors |
| 3 | ======= |
| 4 | The :class:`Processors` provides a information on the number of |
| 5 | processors in a system |
| 6 | .. note:: |
| 7 | Deprecated in favor of `cpu` |
| 8 | |
| 9 | Simple Example |
| 10 | --------------- |
| 11 | To get processors status:: |
| 12 | >>> from plyer import processors |
| 13 | >>> processors.status |
| 14 | {'Number_of_Processors': '4'} |
| 15 | Supported Platforms |
| 16 | ------------------- |
| 17 | Linux |
| 18 | ''' |
| 19 | |
| 20 | |
| 21 | class Processors: |
| 22 | ''' |
| 23 | Number of Processors info facade. |
| 24 | ''' |
| 25 | |
| 26 | @property |
| 27 | def status(self): |
| 28 | ''' |
| 29 | Property that contains a dict with the following fields: |
| 30 | * **Number_of_Processors** *(int)*: Number of Processors in |
| 31 | the system |
| 32 | .. warning:: |
| 33 | If any of the fields is not readable, it is set as |
| 34 | None. |
| 35 | ''' |
| 36 | return self.get_state() |
| 37 | |
| 38 | def get_state(self): |
| 39 | return self._get_state() |
| 40 | |
| 41 | def _get_state(self): |
| 42 | raise NotImplementedError() |