Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-texttable for openSUSE:Factory checked in at 2022-02-15 00:10:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-texttable (Old) and /work/SRC/openSUSE:Factory/.python-texttable.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-texttable" Tue Feb 15 00:10:57 2022 rev:7 rq:954399 version:1.6.4 Changes: -------- --- /work/SRC/openSUSE:Factory/python-texttable/python-texttable.changes 2020-12-21 10:26:54.260217082 +0100 +++ /work/SRC/openSUSE:Factory/.python-texttable.new.1956/python-texttable.changes 2022-02-15 00:10:58.711370606 +0100 @@ -1,0 +2,6 @@ +Mon Feb 14 21:54:33 UTC 2022 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.6.4: + * Fix alignment bug when deco is modified + +------------------------------------------------------------------- Old: ---- texttable-1.6.3.tar.gz New: ---- texttable-1.6.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-texttable.spec ++++++ --- /var/tmp/diff_new_pack.zlcHCn/_old 2022-02-15 00:10:59.259371832 +0100 +++ /var/tmp/diff_new_pack.zlcHCn/_new 2022-02-15 00:10:59.263371842 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-texttable # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-texttable -Version: 1.6.3 +Version: 1.6.4 Release: 0 Summary: Module for creating simple ASCII tables License: MIT ++++++ texttable-1.6.3.tar.gz -> texttable-1.6.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/CHANGELOG.md new/texttable-1.6.4/CHANGELOG.md --- old/texttable-1.6.3/CHANGELOG.md 2020-09-06 10:18:57.000000000 +0200 +++ new/texttable-1.6.4/CHANGELOG.md 2021-07-13 19:17:05.000000000 +0200 @@ -1,5 +1,8 @@ # Version History +v1.6.4 (2021-07-13) +* Fix alignment bug when deco is modified (https://github.com/foutaise/texttable/issues/76) + v1.6.3 (2020-09-06) * Improve int conversion (https://github.com/foutaise/texttable/issues/70) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/PKG-INFO new/texttable-1.6.4/PKG-INFO --- old/texttable-1.6.3/PKG-INFO 2020-09-06 10:45:19.122467500 +0200 +++ new/texttable-1.6.4/PKG-INFO 2021-07-13 19:21:42.920240900 +0200 @@ -1,271 +1,12 @@ Metadata-Version: 2.1 Name: texttable -Version: 1.6.3 +Version: 1.6.4 Summary: module for creating simple ASCII tables Home-page: https://github.com/foutaise/texttable/ Author: Gerome Fournier Author-email: j...@foutaise.org License: MIT -Download-URL: https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz -Description: # texttable - - Python module for creating simple ASCII tables - - ## Availability - - This module is available on [PyPI](https://pypi.org/project/texttable/), and has been packaged for several Linux/Unix platforms - ([Debian](https://packages.debian.org/search?&searchon=names&keywords=python-texttable+), - [FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=texttable&stype=all), Fedora, Suse...). - - ## Dependencies - - If available, [cjkwrap](https://github.com/fgallaire/cjkwrap) library is used instead of textwrap, for a better wrapping of CJK text. - - If available, [wcwidth](https://github.com/jquast/wcwidth) library is used for a better rendering (basic emoji support). - - ## Documentation - - ``` - NAME - texttable - module for creating simple ASCII tables - - FILE - /usr/local/lib/python2.7/dist-packages/texttable.py - - DESCRIPTION - - Example: - - table = Texttable() - table.set_cols_align(["l", "r", "c"]) - table.set_cols_valign(["t", "m", "b"]) - table.add_rows([["Name", "Age", "Nickname"], - ["Mr\nXavier\nHuon", 32, "Xav'"], - ["Mr\nBaptiste\nClement", 1, "Baby"], - ["Mme\nLouise\nBourgeau", 28, "Lou\n\nLoue"]]) - print table.draw() + "\n" - - table = Texttable() - table.set_deco(Texttable.HEADER) - table.set_cols_dtype(['t', # text - 'f', # float (decimal) - 'e', # float (exponent) - 'i', # integer - 'a']) # automatic - table.set_cols_align(["l", "r", "r", "r", "l"]) - table.add_rows([["text", "float", "exp", "int", "auto"], - ["abcd", "67", 654, 89, 128.001], - ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], - ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], - ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) - print table.draw() - - Result: - - +----------+-----+----------+ - | Name | Age | Nickname | - +==========+=====+==========+ - | Mr | | | - | Xavier | 32 | | - | Huon | | Xav' | - +----------+-----+----------+ - | Mr | | | - | Baptiste | 1 | | - | Clement | | Baby | - +----------+-----+----------+ - | Mme | | Lou | - | Louise | 28 | | - | Bourgeau | | Loue | - +----------+-----+----------+ - - text float exp int auto - ============================================== - abcd 67.000 6.540e+02 89 128.001 - efghijk 67.543 6.540e-01 90 1.280e+22 - lmn 0.000 5.000e-78 89 0.000 - opqrstu 0.023 5.000e+78 92 1.280e+22 - - CLASSES - class Texttable - | Methods defined here: - | - | __init__(self, max_width=80) - | Constructor - | - | - max_width is an integer, specifying the maximum width of the table - | - if set to 0, size is unlimited, therefore cells won't be wrapped - | - | add_row(self, array) - | Add a row in the rows stack - | - | - cells can contain newlines and tabs - | - | add_rows(self, rows, header=True) - | Add several rows in the rows stack - | - | - The 'rows' argument can be either an iterator returning arrays, - | or a by-dimensional array - | - 'header' specifies if the first row should be used as the header - | of the table - | - | draw(self) - | Draw the table - | - | - the table is returned as a whole string - | - | header(self, array) - | Specify the header of the table - | - | reset(self) - | Reset the instance - | - | - reset rows and header - | - | set_chars(self, array) - | Set the characters used to draw lines between rows and columns - | - | - the array should contain 4 fields: - | - | [horizontal, vertical, corner, header] - | - | - default is set to: - | - | ['-', '|', '+', '='] - | - | set_cols_align(self, array) - | Set the desired columns alignment - | - | - the elements of the array should be either "l", "c" or "r": - | - | * "l": column flushed left - | * "c": column centered - | * "r": column flushed right - | - | set_cols_dtype(self, array) - | Set the desired columns datatype for the cols. - | - | - the elements of the array should be either a callable or any of - | "a", "t", "f", "e" or "i": - | - | * "a": automatic (try to use the most appropriate datatype) - | * "t": treat as text - | * "f": treat as float in decimal format - | * "e": treat as float in exponential format - | * "i": treat as int - | * a callable: should return formatted string for any value given - | - | - by default, automatic datatyping is used for each column - | - | set_cols_valign(self, array) - | Set the desired columns vertical alignment - | - | - the elements of the array should be either "t", "m" or "b": - | - | * "t": column aligned on the top of the cell - | * "m": column aligned on the middle of the cell - | * "b": column aligned on the bottom of the cell - | - | set_cols_width(self, array) - | Set the desired columns width - | - | - the elements of the array should be integers, specifying the - | width of each column. For example: - | - | [10, 20, 5] - | - | set_deco(self, deco) - | Set the table decoration - | - | - 'deco' can be a combinaison of: - | - | Texttable.BORDER: Border around the table - | Texttable.HEADER: Horizontal line below the header - | Texttable.HLINES: Horizontal lines between rows - | Texttable.VLINES: Vertical lines between columns - | - | All of them are enabled by default - | - | - example: - | - | Texttable.BORDER | Texttable.HEADER - | - | set_header_align(self, array) - | Set the desired header alignment - | - | - the elements of the array should be either "l", "c" or "r": - | - | * "l": column flushed left - | * "c": column centered - | * "r": column flushed right - | - | set_max_width(self, max_width) - | Set the maximum width of the table - | - | - max_width is an integer, specifying the maximum width of the table - | - if set to 0, size is unlimited, therefore cells won't be wrapped - | - | set_precision(self, width) - | Set the desired precision for float/exponential formats - | - | - width must be an integer >= 0 - | - | - default value is set to 3 - | - | ---------------------------------------------------------------------- - | Data and other attributes defined here: - | - | BORDER = 1 - | - | HEADER = 2 - | - | HLINES = 4 - | - | VLINES = 8 - - DATA - __all__ = ['Texttable', 'ArraySizeError'] - __author__ = 'Gerome Fournier <jef(at)foutaise.org>' - __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... - __license__ = 'MIT' - __version__ = '1.6.2' - - VERSION - 1.6.2 - - AUTHOR - Gerome Fournier <jef(at)foutaise.org> - - CREDITS - Jeff Kowalczyk: - - textwrap improved import - - comment concerning header output - - Anonymous: - - add_rows method, for adding rows in one go - - Sergey Simonenko: - - redefined len() function to deal with non-ASCII characters - - Roger Lew: - - columns datatype specifications - - Brian Peterson: - - better handling of unicode errors - - Frank Sachsenheim: - - add Python 2/3-compatibility - - Maximilian Hils: - - fix minor bug for Python 3 compatibility - - frinkelpi: - - preserve empty lines - ``` - - ## Forks - - * [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. - +Download-URL: https://github.com/foutaise/texttable/archive/v1.6.4.tar.gz Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console @@ -285,4 +26,269 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 Description-Content-Type: text/markdown +License-File: LICENSE + +# texttable + +Python module for creating simple ASCII tables + +## Availability + +This module is available on [PyPI](https://pypi.org/project/texttable/), and has been packaged for several Linux/Unix platforms +([Debian](https://packages.debian.org/search?&searchon=names&keywords=python-texttable+), +[FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=texttable&stype=all), Fedora, Suse...). + +## Dependencies + +If available, [cjkwrap](https://github.com/fgallaire/cjkwrap) library is used instead of textwrap, for a better wrapping of CJK text. + +If available, [wcwidth](https://github.com/jquast/wcwidth) library is used for a better rendering (basic emoji support). + +## Documentation + +``` +NAME + texttable - module for creating simple ASCII tables + +FILE + /usr/local/lib/python2.7/dist-packages/texttable.py + +DESCRIPTION + + Example: + + table = Texttable() + table.set_cols_align(["l", "r", "c"]) + table.set_cols_valign(["t", "m", "b"]) + table.add_rows([["Name", "Age", "Nickname"], + ["Mr\nXavier\nHuon", 32, "Xav'"], + ["Mr\nBaptiste\nClement", 1, "Baby"], + ["Mme\nLouise\nBourgeau", 28, "Lou\n\nLoue"]]) + print(table.draw()) + print() + + table = Texttable() + table.set_deco(Texttable.HEADER) + table.set_cols_dtype(['t', # text + 'f', # float (decimal) + 'e', # float (exponent) + 'i', # integer + 'a']) # automatic + table.set_cols_align(["l", "r", "r", "r", "l"]) + table.add_rows([["text", "float", "exp", "int", "auto"], + ["abcd", "67", 654, 89, 128.001], + ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], + ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], + ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) + print(table.draw()) + + Result: + + +----------+-----+----------+ + | Name | Age | Nickname | + +==========+=====+==========+ + | Mr | | | + | Xavier | 32 | | + | Huon | | Xav' | + +----------+-----+----------+ + | Mr | | | + | Baptiste | 1 | | + | Clement | | Baby | + +----------+-----+----------+ + | Mme | | Lou | + | Louise | 28 | | + | Bourgeau | | Loue | + +----------+-----+----------+ + + text float exp int auto + ============================================== + abcd 67.000 6.540e+02 89 128.001 + efghijk 67.543 6.540e-01 90 1.280e+22 + lmn 0.000 5.000e-78 89 0.000 + opqrstu 0.023 5.000e+78 92 1.280e+22 + +CLASSES + class Texttable + | Methods defined here: + | + | __init__(self, max_width=80) + | Constructor + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | add_row(self, array) + | Add a row in the rows stack + | + | - cells can contain newlines and tabs + | + | add_rows(self, rows, header=True) + | Add several rows in the rows stack + | + | - The 'rows' argument can be either an iterator returning arrays, + | or a by-dimensional array + | - 'header' specifies if the first row should be used as the header + | of the table + | + | draw(self) + | Draw the table + | + | - the table is returned as a whole string + | + | header(self, array) + | Specify the header of the table + | + | reset(self) + | Reset the instance + | + | - reset rows and header + | + | set_chars(self, array) + | Set the characters used to draw lines between rows and columns + | + | - the array should contain 4 fields: + | + | [horizontal, vertical, corner, header] + | + | - default is set to: + | + | ['-', '|', '+', '='] + | + | set_cols_align(self, array) + | Set the desired columns alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_cols_dtype(self, array) + | Set the desired columns datatype for the cols. + | + | - the elements of the array should be either a callable or any of + | "a", "t", "f", "e" or "i": + | + | * "a": automatic (try to use the most appropriate datatype) + | * "t": treat as text + | * "f": treat as float in decimal format + | * "e": treat as float in exponential format + | * "i": treat as int + | * a callable: should return formatted string for any value given + | + | - by default, automatic datatyping is used for each column + | + | set_cols_valign(self, array) + | Set the desired columns vertical alignment + | + | - the elements of the array should be either "t", "m" or "b": + | + | * "t": column aligned on the top of the cell + | * "m": column aligned on the middle of the cell + | * "b": column aligned on the bottom of the cell + | + | set_cols_width(self, array) + | Set the desired columns width + | + | - the elements of the array should be integers, specifying the + | width of each column. For example: + | + | [10, 20, 5] + | + | set_deco(self, deco) + | Set the table decoration + | + | - 'deco' can be a combination of: + | + | Texttable.BORDER: Border around the table + | Texttable.HEADER: Horizontal line below the header + | Texttable.HLINES: Horizontal lines between rows + | Texttable.VLINES: Vertical lines between columns + | + | All of them are enabled by default + | + | - example: + | + | Texttable.BORDER | Texttable.HEADER + | + | set_header_align(self, array) + | Set the desired header alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_max_width(self, max_width) + | Set the maximum width of the table + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | set_precision(self, width) + | Set the desired precision for float/exponential formats + | + | - width must be an integer >= 0 + | + | - default value is set to 3 + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | BORDER = 1 + | + | HEADER = 2 + | + | HLINES = 4 + | + | VLINES = 8 + +DATA + __all__ = ['Texttable', 'ArraySizeError'] + __author__ = 'Gerome Fournier <jef(at)foutaise.org>' + __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... + __license__ = 'MIT' + __version__ = '1.6.4' + +VERSION + 1.6.4 + +AUTHOR + Gerome Fournier <jef(at)foutaise.org> + +CREDITS + Jeff Kowalczyk: + - textwrap improved import + - comment concerning header output + + Anonymous: + - add_rows method, for adding rows in one go + + Sergey Simonenko: + - redefined len() function to deal with non-ASCII characters + + Roger Lew: + - columns datatype specifications + + Brian Peterson: + - better handling of unicode errors + + Frank Sachsenheim: + - add Python 2/3-compatibility + + Maximilian Hils: + - fix minor bug for Python 3 compatibility + + frinkelpi: + - preserve empty lines +``` + +## Forks + +* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/README.md new/texttable-1.6.4/README.md --- old/texttable-1.6.3/README.md 2020-06-21 15:47:55.000000000 +0200 +++ new/texttable-1.6.4/README.md 2021-07-13 19:17:24.000000000 +0200 @@ -34,7 +34,8 @@ ["Mr\nXavier\nHuon", 32, "Xav'"], ["Mr\nBaptiste\nClement", 1, "Baby"], ["Mme\nLouise\nBourgeau", 28, "Lou\n\nLoue"]]) - print table.draw() + "\n" + print(table.draw()) + print() table = Texttable() table.set_deco(Texttable.HEADER) @@ -49,7 +50,7 @@ ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) - print table.draw() + print(table.draw()) Result: @@ -167,7 +168,7 @@ | set_deco(self, deco) | Set the table decoration | - | - 'deco' can be a combinaison of: + | - 'deco' can be a combination of: | | Texttable.BORDER: Border around the table | Texttable.HEADER: Horizontal line below the header @@ -218,10 +219,10 @@ __author__ = 'Gerome Fournier <jef(at)foutaise.org>' __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... __license__ = 'MIT' - __version__ = '1.6.2' + __version__ = '1.6.4' VERSION - 1.6.2 + 1.6.4 AUTHOR Gerome Fournier <jef(at)foutaise.org> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/setup.py new/texttable-1.6.4/setup.py --- old/texttable-1.6.3/setup.py 2020-09-06 10:19:32.000000000 +0200 +++ new/texttable-1.6.4/setup.py 2021-07-13 19:17:36.000000000 +0200 @@ -12,11 +12,11 @@ setup( name="texttable", - version="1.6.3", + version="1.6.4", author="Gerome Fournier", author_email="j...@foutaise.org", url="https://github.com/foutaise/texttable/", - download_url="https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz", + download_url="https://github.com/foutaise/texttable/archive/v1.6.4.tar.gz", license="MIT", py_modules=["texttable"], description=DESCRIPTION, @@ -42,6 +42,8 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', ], options={"bdist_wheel": {"universal": "1"}} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/t.py new/texttable-1.6.4/t.py --- old/texttable-1.6.3/t.py 2020-09-06 10:06:59.000000000 +0200 +++ new/texttable-1.6.4/t.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,5 +0,0 @@ -from texttable import Texttable -tt = Texttable() -tt.set_cols_dtype(['i']) # dtype 'i' is the problem here -tt.add_rows([['hello'], [18014398509481983]]) -print(tt.draw()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/texttable.egg-info/PKG-INFO new/texttable-1.6.4/texttable.egg-info/PKG-INFO --- old/texttable-1.6.3/texttable.egg-info/PKG-INFO 2020-09-06 10:45:19.000000000 +0200 +++ new/texttable-1.6.4/texttable.egg-info/PKG-INFO 2021-07-13 19:21:42.000000000 +0200 @@ -1,271 +1,12 @@ Metadata-Version: 2.1 Name: texttable -Version: 1.6.3 +Version: 1.6.4 Summary: module for creating simple ASCII tables Home-page: https://github.com/foutaise/texttable/ Author: Gerome Fournier Author-email: j...@foutaise.org License: MIT -Download-URL: https://github.com/foutaise/texttable/archive/v1.6.3.tar.gz -Description: # texttable - - Python module for creating simple ASCII tables - - ## Availability - - This module is available on [PyPI](https://pypi.org/project/texttable/), and has been packaged for several Linux/Unix platforms - ([Debian](https://packages.debian.org/search?&searchon=names&keywords=python-texttable+), - [FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=texttable&stype=all), Fedora, Suse...). - - ## Dependencies - - If available, [cjkwrap](https://github.com/fgallaire/cjkwrap) library is used instead of textwrap, for a better wrapping of CJK text. - - If available, [wcwidth](https://github.com/jquast/wcwidth) library is used for a better rendering (basic emoji support). - - ## Documentation - - ``` - NAME - texttable - module for creating simple ASCII tables - - FILE - /usr/local/lib/python2.7/dist-packages/texttable.py - - DESCRIPTION - - Example: - - table = Texttable() - table.set_cols_align(["l", "r", "c"]) - table.set_cols_valign(["t", "m", "b"]) - table.add_rows([["Name", "Age", "Nickname"], - ["Mr\nXavier\nHuon", 32, "Xav'"], - ["Mr\nBaptiste\nClement", 1, "Baby"], - ["Mme\nLouise\nBourgeau", 28, "Lou\n\nLoue"]]) - print table.draw() + "\n" - - table = Texttable() - table.set_deco(Texttable.HEADER) - table.set_cols_dtype(['t', # text - 'f', # float (decimal) - 'e', # float (exponent) - 'i', # integer - 'a']) # automatic - table.set_cols_align(["l", "r", "r", "r", "l"]) - table.add_rows([["text", "float", "exp", "int", "auto"], - ["abcd", "67", 654, 89, 128.001], - ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], - ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], - ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) - print table.draw() - - Result: - - +----------+-----+----------+ - | Name | Age | Nickname | - +==========+=====+==========+ - | Mr | | | - | Xavier | 32 | | - | Huon | | Xav' | - +----------+-----+----------+ - | Mr | | | - | Baptiste | 1 | | - | Clement | | Baby | - +----------+-----+----------+ - | Mme | | Lou | - | Louise | 28 | | - | Bourgeau | | Loue | - +----------+-----+----------+ - - text float exp int auto - ============================================== - abcd 67.000 6.540e+02 89 128.001 - efghijk 67.543 6.540e-01 90 1.280e+22 - lmn 0.000 5.000e-78 89 0.000 - opqrstu 0.023 5.000e+78 92 1.280e+22 - - CLASSES - class Texttable - | Methods defined here: - | - | __init__(self, max_width=80) - | Constructor - | - | - max_width is an integer, specifying the maximum width of the table - | - if set to 0, size is unlimited, therefore cells won't be wrapped - | - | add_row(self, array) - | Add a row in the rows stack - | - | - cells can contain newlines and tabs - | - | add_rows(self, rows, header=True) - | Add several rows in the rows stack - | - | - The 'rows' argument can be either an iterator returning arrays, - | or a by-dimensional array - | - 'header' specifies if the first row should be used as the header - | of the table - | - | draw(self) - | Draw the table - | - | - the table is returned as a whole string - | - | header(self, array) - | Specify the header of the table - | - | reset(self) - | Reset the instance - | - | - reset rows and header - | - | set_chars(self, array) - | Set the characters used to draw lines between rows and columns - | - | - the array should contain 4 fields: - | - | [horizontal, vertical, corner, header] - | - | - default is set to: - | - | ['-', '|', '+', '='] - | - | set_cols_align(self, array) - | Set the desired columns alignment - | - | - the elements of the array should be either "l", "c" or "r": - | - | * "l": column flushed left - | * "c": column centered - | * "r": column flushed right - | - | set_cols_dtype(self, array) - | Set the desired columns datatype for the cols. - | - | - the elements of the array should be either a callable or any of - | "a", "t", "f", "e" or "i": - | - | * "a": automatic (try to use the most appropriate datatype) - | * "t": treat as text - | * "f": treat as float in decimal format - | * "e": treat as float in exponential format - | * "i": treat as int - | * a callable: should return formatted string for any value given - | - | - by default, automatic datatyping is used for each column - | - | set_cols_valign(self, array) - | Set the desired columns vertical alignment - | - | - the elements of the array should be either "t", "m" or "b": - | - | * "t": column aligned on the top of the cell - | * "m": column aligned on the middle of the cell - | * "b": column aligned on the bottom of the cell - | - | set_cols_width(self, array) - | Set the desired columns width - | - | - the elements of the array should be integers, specifying the - | width of each column. For example: - | - | [10, 20, 5] - | - | set_deco(self, deco) - | Set the table decoration - | - | - 'deco' can be a combinaison of: - | - | Texttable.BORDER: Border around the table - | Texttable.HEADER: Horizontal line below the header - | Texttable.HLINES: Horizontal lines between rows - | Texttable.VLINES: Vertical lines between columns - | - | All of them are enabled by default - | - | - example: - | - | Texttable.BORDER | Texttable.HEADER - | - | set_header_align(self, array) - | Set the desired header alignment - | - | - the elements of the array should be either "l", "c" or "r": - | - | * "l": column flushed left - | * "c": column centered - | * "r": column flushed right - | - | set_max_width(self, max_width) - | Set the maximum width of the table - | - | - max_width is an integer, specifying the maximum width of the table - | - if set to 0, size is unlimited, therefore cells won't be wrapped - | - | set_precision(self, width) - | Set the desired precision for float/exponential formats - | - | - width must be an integer >= 0 - | - | - default value is set to 3 - | - | ---------------------------------------------------------------------- - | Data and other attributes defined here: - | - | BORDER = 1 - | - | HEADER = 2 - | - | HLINES = 4 - | - | VLINES = 8 - - DATA - __all__ = ['Texttable', 'ArraySizeError'] - __author__ = 'Gerome Fournier <jef(at)foutaise.org>' - __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... - __license__ = 'MIT' - __version__ = '1.6.2' - - VERSION - 1.6.2 - - AUTHOR - Gerome Fournier <jef(at)foutaise.org> - - CREDITS - Jeff Kowalczyk: - - textwrap improved import - - comment concerning header output - - Anonymous: - - add_rows method, for adding rows in one go - - Sergey Simonenko: - - redefined len() function to deal with non-ASCII characters - - Roger Lew: - - columns datatype specifications - - Brian Peterson: - - better handling of unicode errors - - Frank Sachsenheim: - - add Python 2/3-compatibility - - Maximilian Hils: - - fix minor bug for Python 3 compatibility - - frinkelpi: - - preserve empty lines - ``` - - ## Forks - - * [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. - +Download-URL: https://github.com/foutaise/texttable/archive/v1.6.4.tar.gz Platform: any Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Console @@ -285,4 +26,269 @@ Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 Description-Content-Type: text/markdown +License-File: LICENSE + +# texttable + +Python module for creating simple ASCII tables + +## Availability + +This module is available on [PyPI](https://pypi.org/project/texttable/), and has been packaged for several Linux/Unix platforms +([Debian](https://packages.debian.org/search?&searchon=names&keywords=python-texttable+), +[FreeBSD](https://www.freebsd.org/cgi/ports.cgi?query=texttable&stype=all), Fedora, Suse...). + +## Dependencies + +If available, [cjkwrap](https://github.com/fgallaire/cjkwrap) library is used instead of textwrap, for a better wrapping of CJK text. + +If available, [wcwidth](https://github.com/jquast/wcwidth) library is used for a better rendering (basic emoji support). + +## Documentation + +``` +NAME + texttable - module for creating simple ASCII tables + +FILE + /usr/local/lib/python2.7/dist-packages/texttable.py + +DESCRIPTION + + Example: + + table = Texttable() + table.set_cols_align(["l", "r", "c"]) + table.set_cols_valign(["t", "m", "b"]) + table.add_rows([["Name", "Age", "Nickname"], + ["Mr\nXavier\nHuon", 32, "Xav'"], + ["Mr\nBaptiste\nClement", 1, "Baby"], + ["Mme\nLouise\nBourgeau", 28, "Lou\n\nLoue"]]) + print(table.draw()) + print() + + table = Texttable() + table.set_deco(Texttable.HEADER) + table.set_cols_dtype(['t', # text + 'f', # float (decimal) + 'e', # float (exponent) + 'i', # integer + 'a']) # automatic + table.set_cols_align(["l", "r", "r", "r", "l"]) + table.add_rows([["text", "float", "exp", "int", "auto"], + ["abcd", "67", 654, 89, 128.001], + ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], + ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], + ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) + print(table.draw()) + + Result: + + +----------+-----+----------+ + | Name | Age | Nickname | + +==========+=====+==========+ + | Mr | | | + | Xavier | 32 | | + | Huon | | Xav' | + +----------+-----+----------+ + | Mr | | | + | Baptiste | 1 | | + | Clement | | Baby | + +----------+-----+----------+ + | Mme | | Lou | + | Louise | 28 | | + | Bourgeau | | Loue | + +----------+-----+----------+ + + text float exp int auto + ============================================== + abcd 67.000 6.540e+02 89 128.001 + efghijk 67.543 6.540e-01 90 1.280e+22 + lmn 0.000 5.000e-78 89 0.000 + opqrstu 0.023 5.000e+78 92 1.280e+22 + +CLASSES + class Texttable + | Methods defined here: + | + | __init__(self, max_width=80) + | Constructor + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | add_row(self, array) + | Add a row in the rows stack + | + | - cells can contain newlines and tabs + | + | add_rows(self, rows, header=True) + | Add several rows in the rows stack + | + | - The 'rows' argument can be either an iterator returning arrays, + | or a by-dimensional array + | - 'header' specifies if the first row should be used as the header + | of the table + | + | draw(self) + | Draw the table + | + | - the table is returned as a whole string + | + | header(self, array) + | Specify the header of the table + | + | reset(self) + | Reset the instance + | + | - reset rows and header + | + | set_chars(self, array) + | Set the characters used to draw lines between rows and columns + | + | - the array should contain 4 fields: + | + | [horizontal, vertical, corner, header] + | + | - default is set to: + | + | ['-', '|', '+', '='] + | + | set_cols_align(self, array) + | Set the desired columns alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_cols_dtype(self, array) + | Set the desired columns datatype for the cols. + | + | - the elements of the array should be either a callable or any of + | "a", "t", "f", "e" or "i": + | + | * "a": automatic (try to use the most appropriate datatype) + | * "t": treat as text + | * "f": treat as float in decimal format + | * "e": treat as float in exponential format + | * "i": treat as int + | * a callable: should return formatted string for any value given + | + | - by default, automatic datatyping is used for each column + | + | set_cols_valign(self, array) + | Set the desired columns vertical alignment + | + | - the elements of the array should be either "t", "m" or "b": + | + | * "t": column aligned on the top of the cell + | * "m": column aligned on the middle of the cell + | * "b": column aligned on the bottom of the cell + | + | set_cols_width(self, array) + | Set the desired columns width + | + | - the elements of the array should be integers, specifying the + | width of each column. For example: + | + | [10, 20, 5] + | + | set_deco(self, deco) + | Set the table decoration + | + | - 'deco' can be a combination of: + | + | Texttable.BORDER: Border around the table + | Texttable.HEADER: Horizontal line below the header + | Texttable.HLINES: Horizontal lines between rows + | Texttable.VLINES: Vertical lines between columns + | + | All of them are enabled by default + | + | - example: + | + | Texttable.BORDER | Texttable.HEADER + | + | set_header_align(self, array) + | Set the desired header alignment + | + | - the elements of the array should be either "l", "c" or "r": + | + | * "l": column flushed left + | * "c": column centered + | * "r": column flushed right + | + | set_max_width(self, max_width) + | Set the maximum width of the table + | + | - max_width is an integer, specifying the maximum width of the table + | - if set to 0, size is unlimited, therefore cells won't be wrapped + | + | set_precision(self, width) + | Set the desired precision for float/exponential formats + | + | - width must be an integer >= 0 + | + | - default value is set to 3 + | + | ---------------------------------------------------------------------- + | Data and other attributes defined here: + | + | BORDER = 1 + | + | HEADER = 2 + | + | HLINES = 4 + | + | VLINES = 8 + +DATA + __all__ = ['Texttable', 'ArraySizeError'] + __author__ = 'Gerome Fournier <jef(at)foutaise.org>' + __credits__ = 'Jeff Kowalczyk:\n - textwrap improved import\n ...at... + __license__ = 'MIT' + __version__ = '1.6.4' + +VERSION + 1.6.4 + +AUTHOR + Gerome Fournier <jef(at)foutaise.org> + +CREDITS + Jeff Kowalczyk: + - textwrap improved import + - comment concerning header output + + Anonymous: + - add_rows method, for adding rows in one go + + Sergey Simonenko: + - redefined len() function to deal with non-ASCII characters + + Roger Lew: + - columns datatype specifications + + Brian Peterson: + - better handling of unicode errors + + Frank Sachsenheim: + - add Python 2/3-compatibility + + Maximilian Hils: + - fix minor bug for Python 3 compatibility + + frinkelpi: + - preserve empty lines +``` + +## Forks + +* [latextable](https://github.com/JAEarly/latextable) is a fork of texttable that provide a LaTeX backend. + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/texttable.egg-info/SOURCES.txt new/texttable-1.6.4/texttable.egg-info/SOURCES.txt --- old/texttable-1.6.3/texttable.egg-info/SOURCES.txt 2020-09-06 10:45:19.000000000 +0200 +++ new/texttable-1.6.4/texttable.egg-info/SOURCES.txt 2021-07-13 19:21:42.000000000 +0200 @@ -4,7 +4,6 @@ MANIFEST.in README.md setup.py -t.py tests.py texttable.py texttable.pyi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/texttable.py new/texttable-1.6.4/texttable.py --- old/texttable-1.6.3/texttable.py 2020-09-06 10:36:58.000000000 +0200 +++ new/texttable-1.6.4/texttable.py 2021-07-13 19:17:48.000000000 +0200 @@ -13,7 +13,8 @@ ["Mr\\nXavier\\nHuon", 32, "Xav'"], ["Mr\\nBaptiste\\nClement", 1, "Baby"], ["Mme\\nLouise\\nBourgeau", 28, "Lou\\n\\nLoue"]]) - print table.draw() + "\\n" + print(table.draw()) + print() table = Texttable() table.set_deco(Texttable.HEADER) @@ -28,7 +29,7 @@ ["efghijk", 67.5434, .654, 89.6, 12800000000000000000000.00023], ["lmn", 5e-78, 5e-78, 89.4, .000000000000128], ["opqrstu", .023, 5e+78, 92., 12800000000000000000000]]) - print table.draw() + print(table.draw()) Result: @@ -62,7 +63,7 @@ __author__ = 'Gerome Fournier <jef(at)foutaise.org>' __license__ = 'MIT' -__version__ = '1.6.3' +__version__ = '1.6.4' __credits__ = """\ Jeff Kowalczyk: - textwrap improved import @@ -246,7 +247,7 @@ def set_deco(self, deco): """Set the table decoration - - 'deco' can be a combinaison of: + - 'deco' can be a combination of: Texttable.BORDER: Border around the table Texttable.HEADER: Horizontal line below the header @@ -261,6 +262,7 @@ """ self._deco = deco + self._hline_string = None return self def set_header_align(self, array): @@ -724,7 +726,8 @@ ["Mr\nXavier\nHuon", 32, "Xav'"], ["Mr\nBaptiste\nClement", 1, "Baby"], ["Mme\nLouise\nBourgeau", 28, "Lou\n \nLoue"]]) - print(table.draw() + "\n") + print(table.draw()) + print() table = Texttable() table.set_deco(Texttable.HEADER) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/texttable-1.6.3/tox.ini new/texttable-1.6.4/tox.ini --- old/texttable-1.6.3/tox.ini 2020-09-06 10:33:41.000000000 +0200 +++ new/texttable-1.6.4/tox.ini 2020-12-12 01:02:32.000000000 +0100 @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,py36,py37,py38 +envlist = py27,py35,py36,py37,py38,py39 [testenv] deps =