Skip to content

Instantly share code, notes, and snippets.

@acaranta
Created September 11, 2014 09:28
Show Gist options
  • Save acaranta/875ba285d4aa60c19141 to your computer and use it in GitHub Desktop.
Save acaranta/875ba285d4aa60c19141 to your computer and use it in GitHub Desktop.
Text Table ... nice display of data
import texttable
#create table
table = texttable.Texttable()
table.set_cols_align(["l", "l"])
table.set_cols_width(["12", "12"])
table.header(["Col 1", "Col 2"])
# Add Rows
table.add_row([vluevar, "hellow"])
#print it
print table.draw()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment