I\'m not great on all the technical terms so I\'ll do my best to explain my problem.
I\'ve written a small script to open android SDK and check for attached devices
Try the following:
import os
import subprocess
import time
print ('Current Directory: {}'.format(os.getcwd()) )
print ('Opening Android SDK...')
os.chdir('C:\\android-sdk\\platform-tools')
print ('Current Directory: {}'.format(os.getcwd()) )
t = str(time.ctime())
try:
process_output = subprocess.check_output(["adb", "devices", "-l"])
except: #Add here the type of exception you want to raise and logic
print("Please check your ADB installation and syntax.")
s = ('{} Checking for connected devices: {}'.format(t,process_output) )
with open('logfile.txt', 'w') as f:
f.write(s)