def create_index(self, table, field, unique=False, ascending=True):
if unique: u = "<STR_LIT>"<EOL>else: u = "<STR_LIT>"<EOL>if ascending: a = "<STR_LIT>"<EOL>else: a = "<STR_LIT>"<EOL>sql  = "<STR_LIT>"+u+"<STR_LIT>"+table+"<STR_LIT:_>"+field+"<STR_LIT:U+0020>"<EOL>sql += "<STR_LIT>"+table+"<STR_LIT:(>"+field+"<STR_LIT:U+0020>"+a+"<STR_LIT:)>"<EOL>self._cur.execute(sql)<EOL>self._con.commit()<EOL>
Creates a table index.

        Creates an index on the given table,
        on the given field with unique values enforced or not,
        in ascending or descending order.