Beispiel #1
0
 print(
     '\n1. Create table\n2. Insert data\n3. Display\n4. Drop Table\n5. Parse\n6. Store the data\n7. Plot Graph\n8. Exit\n'
 )
 ch = int(input("Enter ur choice: "))
 if (ch == 1):
     database.create_table(conn)
 elif (ch == 2):
     database.insert_into_table(conn)
 elif (ch == 3):
     database.display_data(conn)
 elif (ch == 4):
     database.drop_table(conn)
 elif (ch == 5):
     count = 0
     flag = False
     cursor = database.pointer_to_rows(conn)
     for rows in cursor:
         count += 1
         print('\nData ', count)
         print('\nAltitude: ', parse.get_altitude(rows[1]))
         print('\nGPS_Latitude: ', parse.get_gps_latitude(rows[1]))
         print('\nGPS_Longitude: ', parse.get_gps_longitude(rows[1]))
         print('\nGPS_Altitude: ', parse.get_gps_altitude(rows[1]))
 elif (ch == 6):
     print(
         "\n1. Store the altitude plots\n2. Store the GPS Latitude plots\n3. Store the GPS Longitude plots\n4. Store the GPS Altitude plots\n"
     )
     ch1 = int(input("\nEnter your sub choice: "))
     if (ch1 == 1):
         count = 0
         f = open("alt_file.txt", "w")