-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add expanded output (\x) support #63
Conversation
Thank you for adding this, I appreciate it very much. I'll have to spend a bit more time on this. In the meantime, it looks like the tests are failing on Python 3. https://travis-ci.org/amjith/pgcli/builds/46178430 |
max_row_len = row_len | ||
|
||
for item in zip(padded_headers, row): | ||
row_result += item[0] + u" " + unicode(item[1]) + u"\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to do something like this https://github.com/amjith/pgcli/blob/master/pgcli/packages/tabulate.py#L18 to make the code compatible between Py2 and Py3.
I pulled it locally and tested it out. It works beautifully. Thank you!! If you can address the two comments mentioned above, I'll have no concerns with merging this in. 🌲 |
Oh and thanks for adding tests!! Very much appreciated. |
Merging this in, so I can make it work for Python 3. Thanks again @stuartquin. 🍸 |
Merged it via command line to resolve some conflicts. Thank you! |
Hi @amjith
I've added an expanded output flag, it attempts to emulate the psql version as much as possible.
Unfortunately I couldn't find a nice way of doing this with tabulate so added my own
expanded.py
.Let me know if anything needs modified!
Thanks