def verifyOneComponent(name): print "\nTesting installation of "+name+"..." (goodToGo,reason) = SmsdkInstallVerifier.verifyComponents([name]) if goodToGo: print 'PASS!' print reason else: print 'FAIL!' if name==SmsdkInstallVerifier.PYWIN32: print "Note: {0} is only required to run the MuxConfig application.".format(SmsdkInstallVerifier.PYWIN32) print reason return goodToGo
#============================ adjust path ===================================== import sys import os if __name__ == "__main__": here = sys.path[0] sys.path.insert(0, os.path.join(here, '..', '..')) #============================ verify installation ============================= from SmartMeshSDK.utils import SmsdkInstallVerifier (goodToGo,reason) = SmsdkInstallVerifier.verifyComponents( [ SmsdkInstallVerifier.PYTHON, SmsdkInstallVerifier.PYWIN32, SmsdkInstallVerifier.PYSERIAL, ] ) if not goodToGo: print "Your installation does not allow this application to run:\n" print reason raw_input("Press any button to exit") sys.exit(1) #============================ imports ========================================= import Tkinter try: import ttk except ImportError:
#!/usr/bin/python #============================ adjust path ===================================== import sys import os if __name__ == "__main__": here = sys.path[0] sys.path.insert(0, os.path.join(here, '..', '..', 'libs')) sys.path.insert(0, os.path.join(here, '..', '..', 'external_libs')) #============================ verify installation ============================= from SmartMeshSDK.utils import SmsdkInstallVerifier (goodToGo, reason) = SmsdkInstallVerifier.verifyComponents([ SmsdkInstallVerifier.PYTHON, ]) if not goodToGo: print "Your installation does not allow this application to run:\n" print reason raw_input("Press any button to exit") sys.exit(1) #============================ imports ========================================= import threading import binascii from SmartMeshSDK.utils import AppUtils, \ FormatUtils from SmartMeshSDK.SerialConnector import Hdlc
#============================ adjust path ===================================== import sys import os if __name__ == "__main__": here = sys.path[0] sys.path.insert(0, os.path.join(here, '..', '..','libs')) sys.path.insert(0, os.path.join(here, '..', '..','external_libs')) #============================ verify installation ============================= from SmartMeshSDK.utils import SmsdkInstallVerifier (goodToGo,reason) = SmsdkInstallVerifier.verifyComponents( [ SmsdkInstallVerifier.PYTHON, ] ) if not goodToGo: print "Your installation does not allow this application to run:\n" print reason raw_input("Press any button to exit") sys.exit(1) #============================ imports ========================================= import threading import binascii from SmartMeshSDK.utils import AppUtils, \ FormatUtils