def version_check(): if os.path.isfile(gl.LICENSE_TXT): fob = open(gl.LICENSE_TXT, "r") listme = fob.readlines() fob.close() try: version_year = sqlconns.decrypt_with_key(listme[0]) ret = sqlear = sqlconns.decrypt_with_key(listme[0]) ret = sqlconns.sql_select_single_field( "SELECT TOP 1 [data] FROM tversion WHERE [property] like 'database version'" ) if ret == -1: return False database_version = str.split(ret, '.') if int(version_year) >= int('20' + database_version[0]): return True else: f.error_logging(APPNAME, "Version is out of date....canot start.", "error_log", "") return False except Exception as e: return False else: f.error_logging(APPNAME, "Error reading license.txt file.", "error_log", "") return False
def return_version(): if os.path.isfile(gl.LICENSE_TXT): fob=open(gl.LICENSE_TXT, "r") listme = fob.readlines() fob.close() try: version_year = sqlconns.decrypt_with_key(listme[0]) return version_year except Exception as e: return False else: f.error_logging(APPNAME, "Error reading license.txt file.", "error_log","") return False
print(value1) from statistics import mode import datetime z = 1234567688890 print(datetime.datetime.now()) print(mode(str(z))) print(datetime.datetime.now()) xx = 'ZgCiQIUbDfZpu9G2ko1QVw==' xx = 'aByVouKtwcq/8f0qtFRLmA==' import sqlconns print(sqlconns.decrypt_with_key(xx)) xlist = (1, 2, 3, 4, 5, 6, 7, 8, 9) print(sum(xlist)) #is the same as x = 0 for number in xlist: x += number x = { 'timezone87': [b'0'], 'uface89': [b'on'], 'timezone88': [b'0'], 'timezone85': [b'0'], 'timezone82': [b'0'],
fob.close() try: version_year = sqlconns.decrypt_with_key(listme[0]) return version_year except Exception as e: return False else: f.error_logging(APPNAME, "Error reading license.txt file.", "error_log", "") return False #class test_server(object): # log_initialise() # if set_env()==True: # if version_check()==True: # server_class = http.server.HTTPServer # httpd = server_class(("", gl.server_port), MyHandler) # try: # httpd.serve_forever() # SERVER_STARTED = 1 # except Exception as e: # print(e) # httpd.server_close() # sys.exit() if __name__ == '__main__': #win32serviceutil.HandleCommandLine(AppServerSvc) #tx = test_server() print(sqlconns.decrypt_with_key("""CFIH8V/9VDxoqWKul7VOTA===="""))