how to see module contents?
Posted: Mon Apr 18, 2022 1:23 am
upythons builtin onewire module is throwing an error
This module is either frozen or baked-in not in lib
I'd like to have a peek at ds18x20.py to try to figure out the problem but I can't work out how to do it in the repl? Can't seem to get past
Thoughts on how to see what's in ds18x20.py anybody?
Code: Select all
File "ds18x20.py", line 20, in convert_temp
TypeError: function takes 1 positional arguments but 2 were given
Code: Select all
>>> os.listdir('lib')
['urequests.py']
Code: Select all
>>> dir(onewire)
['__class__', '__name__', '__file__', 'machine', 'time', 'OneWire', 'DS18X20']
>>> inspect.getsource(onewire)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'inspect' isn't defined