def clean_up_tables(db, tmp_prefix):
 db.execute('BEGIN')
 for table in ('point', 'line', 'roads', 'polygon'):
  db.execute(('DROP TABLE %(tmp_prefix)s_%(table)s' % locals()))
  db.execute(("DELETE FROM geometry_columns WHERE f_table_name = '%(tmp_prefix)s_%(table)s'" % locals()))
 db.execute('COMMIT')

def clean_up_tables ( db , tmp_prefix ) : db . execute ( 'BEGIN' ) for table in ( 'point' , 'line' , 'roads' , 'polygon' ) : db . execute ( ( 'DROP TABLE %(tmp_prefix)s_%(table)s' % locals ( ) ) ) db . execute ( ( "DELETE FROM geometry_columns WHERE f_table_name = '%(tmp_prefix)s_%(table)s'" % locals ( ) ) ) db . execute ( 'COMMIT' )
drop all temporary tables created by prepare_data() .