<s> from pysqlite2 import dbapi2 as sqlite3 <EOL> FIELD_MAX_WIDTH = <NUM_LIT:20> <EOL> TABLE_NAME = '<STR_LIT>' <EOL> SELECT = '<STR_LIT>' % TABLE_NAME <EOL> con = sqlite3 . connect ( "<STR_LIT>" ) <EOL> cur = con . cursor ( ) <EOL> cur . execute ( SELECT ) <EOL> for fieldDesc in cur . description : <EOL> print fieldDesc [ <NUM_LIT:0> ] . ljust ( FIELD_MAX_WIDTH ) , <EOL> print <EOL> print '<STR_LIT:->' * <NUM_LIT> <EOL> fieldIndices = range ( len ( cur . description ) ) <EOL> for row in cur : <EOL> for fieldIndex in fieldIndices : <EOL> fieldValue = str ( row [ fieldIndex ] ) <EOL> print fieldValue . ljust ( FIELD_MAX_WIDTH ) , <EOL> print </s>
