mport sqlite3 из группы импорта itertools
aes_fault_db = r 'C: \ Users \ Desktop \ Jetwave Cases \ 9V-SHD_20200313_0007 \ AES \ Maintenance \ AESFault_1.sqlite3'
def create_connection (aes_fault_db):
try:
conn = sqlite3.connect(aes_fault_db)
except Error as e:
print(e)
c = connection.cursor()
c.execute('SELECT recordid, record_type, modman_ticks, modman_date, modman_time, modman_power_on_counter,',
'modman_flight_cycle_ounter, modman_latitude, modman_longitude, modman_altitude,',
'modman_ground_speed, modman_aircraft_id, modman_flight_leg, L1_code, L2_code,',
'L3_code, L4_code, L1_text, L2_text, L3_text, L4_text, additional_text,',
'lru_recorded_temperature, lru_time, lru_antenna_azimuth, lru_antenna_elev * FROM aes_fault')
data = c.fetchall()
if data == None:
print('no results for this query')
dataSize = c.rowcount
print(c.rowcount)
print(data)
for row in data:
print(row)
c.close