1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
|
%global _empty_manifest_terminate_build 0
Name: python-texttable
Version: 1.6.7
Release: 1
Summary: module to create simple ASCII tables
License: MIT
URL: https://github.com/foutaise/texttable/
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e4/84/4686ee611bb020038375c5f11fe7b6b3bb94ee78614a1faba45effe51591/texttable-1.6.7.tar.gz
BuildArch: noarch
%description
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.7'
VERSION
1.6.7
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.
%package -n python3-texttable
Summary: module to create simple ASCII tables
Provides: python-texttable
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-texttable
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.7'
VERSION
1.6.7
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.
%package help
Summary: Development documents and examples for texttable
Provides: python3-texttable-doc
%description help
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.7'
VERSION
1.6.7
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.
%prep
%autosetup -n texttable-1.6.7
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-texttable -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.6.7-1
- Package Spec generated
|