Giter Club home page Giter Club logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
printt() has been removed in PrettyTable 0.6.  To print a table, you now just 
pass the result of get_string() to Python's built in printing function.  In 2.x:

print pt.get_string(sort='something')

and in 3.x:

print(pt.get_string(sort='something'))

This was done mostly to make the code simultaneously compatible with Python 2.x 
and 3.x.  Also, it really was a bit silly having a method which simply used the 
in-built print to display the result of another function.

get_string() and printt() have always accepted the same keyword arguments, so 
you should simply be able to do a search-and-replace on an existing codebase 
and have things work no problem.

Finally, could you clarify what you mean by saying that your code returns 
"printt"?  There is no printt method in the 0.6 code so it should not be 
possible for a printt call to return anything.  For me, calling printt on a 0.6 
table raises an AttributeError in 2.x and 3.x.  Does this happen for you?  If 
you really are getting a string "printt" back from the code you posted, I'm 
very confused and would like to know more.

Original comment by [email protected] on 9 May 2012 at 8:15

from prettytable.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 17, 2024
Closing as invalid due to lack of further details and original problem arising 
from misusing 0.6 API.

Original comment by [email protected] on 17 May 2012 at 2:15

  • Changed state: Invalid

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.