GithubHelp home page GithubHelp logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 16, 2024
Hi there, sorry for the slow response.

Your step 2, table.header(['\033[34mxyz\033[0m']), is not a valid use of the 
PrettyTable API.  The header attribute is a boolean flag, not a callable 
function.

I assume you meant maybe something like table.field_names = 
['\033[34mxyz\033[0m'], i.e. you want one of the field names to be in colour.

I can't replicate your problem, I've included ANSI color codes in a field name 
and the alignment continues to work as expected.

Could you please paste some valid code which runs and demonstrates your issue?

Thank you for the report.

Original comment by [email protected] on 5 Oct 2013 at 10:26

from prettytable.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 16, 2024
I'm also having the same problem here except it only happens over ssh. If I run 
my program locally the formatting is just fine. 

Original comment by [email protected] on 22 Feb 2014 at 11:58

from prettytable.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 16, 2024
This shall reproduce it. I think the issue 54 I opened is related to this one:

#!/usr/bin/python
from prettytable import PrettyTable

x = PrettyTable(["City name", "Area", "Population", "Annual Rainfall"])
x.align["City name"] = "l" # Left align city names
x.padding_width = 1 # One space between column edges and contents (default)
x.add_row(["Adelaide",1295, 1158259, 600.5])
x.add_row(["Brisbane",5905, 1857594, "\033[94m1146.4\033[0m"])
x.add_row(["Darwin", 112, 120900, 1714.7])
x.add_row(["Hobart", 1357, 205556, 619.5])
x.add_row(["Sydney", 2058, 4336374, 1214.8])
x.add_row(["Melbourne", 1566, 3806092, 646.9])
x.add_row(["Perth", 5386, 1554769, 869.4])
print x

Original comment by [email protected] on 6 Jun 2014 at 10:50

from prettytable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.