comparison sqlpyPlus.py @ 106:31de4c0b06ee v1.4.6

fixed python2.4 compat
author catherine@localhost
date Mon, 09 Jun 2008 12:35:13 -0400
parents 1e69f3a26216
children 38ee1ca92801
comparison
equal deleted inserted replaced
105:1e69f3a26216 106:31de4c0b06ee
457 elif outformat in ('\\s', '\\S', '\\c', '\\C'): #csv 457 elif outformat in ('\\s', '\\S', '\\c', '\\C'): #csv
458 result = [] 458 result = []
459 if outformat in ('\\s', '\\c'): 459 if outformat in ('\\s', '\\c'):
460 result.append(','.join('"%s"' % colname for colname in self.colnames)) 460 result.append(','.join('"%s"' % colname for colname in self.colnames))
461 for row in self.rows: 461 for row in self.rows:
462 result.append(','.join('"%s"' % ('' if itm is None else itm) for itm in row)) 462 result.append(','.join('"%s"' % self.str_or_empty(itm) for itm in row))
463 result = '\n'.join(result) 463 result = '\n'.join(result)
464 elif outformat == '\\h': 464 elif outformat == '\\h':
465 result = self.output_as_html_table() 465 result = self.output_as_html_table()
466 elif outformat == '\\t': 466 elif outformat == '\\t':
467 rows = [self.colnames] 467 rows = [self.colnames]