You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def render_result(self, cursor, paginate=True,
filepath=None, sqlformat=None):
"""Render a result set and pipe through less.
Args:
cursor: iterable of tuples, with one special method:
cursor.keys() which returns a list of string columns
headings for the tuples.
"""
if not sqlformat:
sqlformat = self.sqlformat
if filepath:
out = open(filepath, 'w')
sqlformat = 'csv'
else:
out = pager()
with out as stdout:
if sqlformat == 'csv':
self.format_result_csv(cursor, out=stdout)
else:
asciitable.draw(cursor, out=stdout,
paginate=paginate,
max_fieldsize=self.max_fieldsize)
Will PR a fix if you guys agree with this advice
The text was updated successfully, but these errors were encountered:
I think should print result in the output cell in notebook if "ipython notebook " and load this extension in the opened notebook.
screenshots: [ Please do not mind the mask on the screenshots, for I use some data of our company, just for security reasons, thanks a lot ]
input on notebook cell
![screen_shot 2015-09-24 at 2 15 36 pm](https://cloud.githubusercontent.com/assets/4660350/10066641/82a76406-62c7-11e5-9f8d-7009817a537b.png)
#### output result in console![screen_shot 2015-09-24 at 2 15 53 pm](https://cloud.githubusercontent.com/assets/4660350/10066638/7d00d9ba-62c7-11e5-8723-52e779c976b1.png)
#### code related is herehttps://github.com/jaysw/ipydb/blob/master/ipydb/plugin.py
Will PR a fix if you guys agree with this advice
The text was updated successfully, but these errors were encountered: