MCPcopy Index your code
hub / github.com/catherinedevlin/ipython-sql / CsvResultDescriptor

Class CsvResultDescriptor

src/sql/run.py:65–72  ·  view source on GitHub ↗

Provides IPython Notebook-friendly output for the feedback after a ``.csv`` called.

Source from the content-addressed store, hash-verified

63 self.writerow(row)
64
65class CsvResultDescriptor(object):
66 """Provides IPython Notebook-friendly output for the feedback after a ``.csv`` called."""
67 def __init__(self, file_path):
68 self.file_path = file_path
69 def __repr__(self):
70 return 'CSV results at %s' % os.path.join(os.path.abspath('.'), self.file_path)
71 def _repr_html_(self):
72 return '<a href="%s">CSV results</a>' % os.path.join('.', 'files', self.file_path)
73
74
75def _nonbreaking_spaces(match_obj):

Callers 1

csvMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected