16 lines
285 B
Python
Executable File
16 lines
285 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import os
|
|
import subprocess
|
|
import re
|
|
|
|
p = subprocess.Popen(['gpio', 'i2cdetect'],stdout=subprocess.PIPE,)
|
|
#cmdout = str(p.communicate())
|
|
|
|
lines = list()
|
|
p.stdout.readline()
|
|
for i in range(1,9):
|
|
lines.append(str(p.stdout.readline()).split(' ')[1:])
|
|
|
|
print(lines)
|