Неправильный модуль Python должен выдавать соответствующую ошибку
Я использую модуль Python psutil, где я использую модуль psutil dummy в коде. Например,
Python 2.7.3 (default, Oct 26 2016, 21:01:49)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensor()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'sensor'
Я хочу вывод, как показано ниже
Python 2.7.3 (default, Oct 26 2016, 21:01:49)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.sensor()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'sensor'
RuntimeError: Unsupported function Sensor() >>> looking for this output
Какие изменения я хочу изменить в модулях psutil, чтобы получить этот вывод?