0

Modules: Where are they?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Modules: Where are they?

by tultalk on Tue May 19, 2020 12:17 pm

busio.py (for instance others same imports)

from adafruit_blinka import Enum, Lockable, agnostic
from adafruit_blinka.agnostic import board_id, detector
import adafruit_platformdetect.constants.boards as ap_board
import adafruit_platformdetect.constants.chips as ap_chip

Highlighted modules not in parent modules.

Not anywhere in the dist packages

Where are they? Is this an old module (just installed)?

Thanks

Robert

tultalk
 
Posts: 24
Joined: Thu May 14, 2020 7:00 pm

Re: Modules: Where are they?

by dastels on Tue May 19, 2020 12:24 pm

They're defined in the respective __init__.py

Dave

dastels
 
Posts: 2453
Joined: Tue Oct 20, 2015 3:22 pm

Re: Modules: Where are they?

by tultalk on Tue May 19, 2020 2:17 pm

Hi:

As in here:

detector = adafruit_platformdetect.Detector()
chip_id = detector.chip.id
board_id = detector.board.id

Thanks

Robert

tultalk
 
Posts: 24
Joined: Thu May 14, 2020 7:00 pm

Re: Modules: Where are they?

by tultalk on Tue May 19, 2020 2:24 pm

Compile Python 3.7

python -m py_compile "busio.py" (in directory: /usr/local/lib/python3.7/dist-packages)
File "busio.py", line 86
def readfrom_into(self, address, buffer, *, start=0, end=None):
^
SyntaxError: invalid syntax
Compilation failed.

Suggestion?

Thanks

tultalk
 
Posts: 24
Joined: Thu May 14, 2020 7:00 pm

Re: Modules: Where are they?

by tultalk on Tue May 19, 2020 2:49 pm

Never mind. Build cmd was defaulting to 2.7. Changed to 3.7 and Ok.

Regards

tultalk
 
Posts: 24
Joined: Thu May 14, 2020 7:00 pm

Re: Modules: Where are they?

by tultalk on Tue May 19, 2020 3:45 pm

chips .py contains line BCM_RANGE = {"BCM2708", "BCM2709", "BCM2711", "BCM2835", "BCM2837"}

Why isn't BCM2836 included? Queried in chip.py. Makes no difference?

Thanks

Robert

tultalk
 
Posts: 24
Joined: Thu May 14, 2020 7:00 pm

Please be positive and constructive with your questions and comments.