DESCRIPTION.rst 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. ===============
  2. python-tabulate
  3. ===============
  4. Pretty-print tabular data in Python, a library and a command-line
  5. utility.
  6. The main use cases of the library are:
  7. * printing small tables without hassle: just one function call,
  8. formatting is guided by the data itself
  9. * authoring tabular data for lightweight plain-text markup: multiple
  10. output formats suitable for further editing or transformation
  11. * readable presentation of mixed textual and numeric data: smart
  12. column alignment, configurable number formatting, alignment by a
  13. decimal point
  14. Installation
  15. ------------
  16. To install the Python library and the command line utility, run::
  17. pip install tabulate
  18. The command line utility will be installed as ``tabulate`` to ``bin`` on Linux
  19. (e.g. ``/usr/bin``); or as ``tabulate.exe`` to ``Scripts`` in your Python
  20. installation on Windows (e.g. ``C:\Python27\Scripts\tabulate.exe``).
  21. You may consider installing the library only for the current user::
  22. pip install tabulate --user
  23. In this case the command line utility will be installed to ``~/.local/bin/tabulate``
  24. on Linux and to ``%APPDATA%\Python\Scripts\tabulate.exe`` on Windows.
  25. To install just the library on Unix-like operating systems::
  26. TABULATE_INSTALL=lib-only pip install tabulate
  27. On Windows::
  28. set TABULATE_INSTALL=lib-only
  29. pip install tabulate
  30. Library usage
  31. -------------
  32. The module provides just one function, ``tabulate``, which takes a
  33. list of lists or another tabular data type as the first argument,
  34. and outputs a nicely formatted plain-text table::
  35. >>> from tabulate import tabulate
  36. >>> table = [["Sun",696000,1989100000],["Earth",6371,5973.6],
  37. ... ["Moon",1737,73.5],["Mars",3390,641.85]]
  38. >>> print tabulate(table)
  39. ----- ------ -------------
  40. Sun 696000 1.9891e+09
  41. Earth 6371 5973.6
  42. Moon 1737 73.5
  43. Mars 3390 641.85
  44. ----- ------ -------------
  45. The following tabular data types are supported:
  46. * list of lists or another iterable of iterables
  47. * list or another iterable of dicts (keys as columns)
  48. * dict of iterables (keys as columns)
  49. * two-dimensional NumPy array
  50. * NumPy record arrays (names as columns)
  51. * pandas.DataFrame
  52. Examples in this file use Python2. Tabulate supports Python3 too.
  53. Headers
  54. ~~~~~~~
  55. The second optional argument named ``headers`` defines a list of
  56. column headers to be used::
  57. >>> print tabulate(table, headers=["Planet","R (km)", "mass (x 10^29 kg)"])
  58. Planet R (km) mass (x 10^29 kg)
  59. -------- -------- -------------------
  60. Sun 696000 1.9891e+09
  61. Earth 6371 5973.6
  62. Moon 1737 73.5
  63. Mars 3390 641.85
  64. If ``headers="firstrow"``, then the first row of data is used::
  65. >>> print tabulate([["Name","Age"],["Alice",24],["Bob",19]],
  66. ... headers="firstrow")
  67. Name Age
  68. ------ -----
  69. Alice 24
  70. Bob 19
  71. If ``headers="keys"``, then the keys of a dictionary/dataframe, or
  72. column indices are used. It also works for NumPy record arrays and
  73. lists of dictionaries or named tuples::
  74. >>> print tabulate({"Name": ["Alice", "Bob"],
  75. ... "Age": [24, 19]}, headers="keys")
  76. Age Name
  77. ----- ------
  78. 24 Alice
  79. 19 Bob
  80. Row Indices
  81. ~~~~~~~~~~~
  82. By default, only pandas.DataFrame tables have an additional column
  83. called row index. To add a similar column to any other type of table,
  84. pass ``showindex="always"`` or ``showindex=True`` argument to
  85. ``tabulate()``. To suppress row indices for all types of data, pass
  86. ``showindex="never"`` or ``showindex=False``. To add a custom row
  87. index column, pass ``showindex=rowIDs``, where ``rowIDs`` is some
  88. iterable::
  89. >>> print(tabulate([["F",24],["M",19]], showindex="always"))
  90. - - --
  91. 0 F 24
  92. 1 M 19
  93. - - --
  94. Table format
  95. ~~~~~~~~~~~~
  96. There is more than one way to format a table in plain text.
  97. The third optional argument named ``tablefmt`` defines
  98. how the table is formatted.
  99. Supported table formats are:
  100. - "plain"
  101. - "simple"
  102. - "grid"
  103. - "fancy_grid"
  104. - "pipe"
  105. - "orgtbl"
  106. - "jira"
  107. - "presto"
  108. - "psql"
  109. - "rst"
  110. - "mediawiki"
  111. - "moinmoin"
  112. - "youtrack"
  113. - "html"
  114. - "latex"
  115. - "latex_raw"
  116. - "latex_booktabs"
  117. - "textile"
  118. ``plain`` tables do not use any pseudo-graphics to draw lines::
  119. >>> table = [["spam",42],["eggs",451],["bacon",0]]
  120. >>> headers = ["item", "qty"]
  121. >>> print tabulate(table, headers, tablefmt="plain")
  122. item qty
  123. spam 42
  124. eggs 451
  125. bacon 0
  126. ``simple`` is the default format (the default may change in future
  127. versions). It corresponds to ``simple_tables`` in `Pandoc Markdown
  128. extensions`::
  129. >>> print tabulate(table, headers, tablefmt="simple")
  130. item qty
  131. ------ -----
  132. spam 42
  133. eggs 451
  134. bacon 0
  135. ``grid`` is like tables formatted by Emacs' `table.el`
  136. package. It corresponds to ``grid_tables`` in Pandoc Markdown
  137. extensions::
  138. >>> print tabulate(table, headers, tablefmt="grid")
  139. +--------+-------+
  140. | item | qty |
  141. +========+=======+
  142. | spam | 42 |
  143. +--------+-------+
  144. | eggs | 451 |
  145. +--------+-------+
  146. | bacon | 0 |
  147. +--------+-------+
  148. ``fancy_grid`` draws a grid using box-drawing characters::
  149. >>> print tabulate(table, headers, tablefmt="fancy_grid")
  150. ╒════════╤═══════╕
  151. │ item │ qty │
  152. ╞════════╪═══════╡
  153. │ spam │ 42 │
  154. ├────────┼───────┤
  155. │ eggs │ 451 │
  156. ├────────┼───────┤
  157. │ bacon │ 0 │
  158. ╘════════╧═══════╛
  159. ``presto`` is like tables formatted by Presto cli::
  160. >>> print tabulate.tabulate()
  161. item | qty
  162. --------+-------
  163. spam | 42
  164. eggs | 451
  165. bacon | 0
  166. ``psql`` is like tables formatted by Postgres' psql cli::
  167. >>> print tabulate.tabulate()
  168. +--------+-------+
  169. | item | qty |
  170. |--------+-------|
  171. | spam | 42 |
  172. | eggs | 451 |
  173. | bacon | 0 |
  174. +--------+-------+
  175. ``pipe`` follows the conventions of `PHP Markdown Extra` extension. It
  176. corresponds to ``pipe_tables`` in Pandoc. This format uses colons to
  177. indicate column alignment::
  178. >>> print tabulate(table, headers, tablefmt="pipe")
  179. | item | qty |
  180. |:-------|------:|
  181. | spam | 42 |
  182. | eggs | 451 |
  183. | bacon | 0 |
  184. ``orgtbl`` follows the conventions of Emacs `org-mode`, and is editable
  185. also in the minor `orgtbl-mode`. Hence its name::
  186. >>> print tabulate(table, headers, tablefmt="orgtbl")
  187. | item | qty |
  188. |--------+-------|
  189. | spam | 42 |
  190. | eggs | 451 |
  191. | bacon | 0 |
  192. ``jira`` follows the conventions of Atlassian Jira markup language::
  193. >>> print tabulate(table, headers, tablefmt="jira")
  194. || item || qty ||
  195. | spam | 42 |
  196. | eggs | 451 |
  197. | bacon | 0 |
  198. ``rst`` formats data like a simple table of the `reStructuredText` format::
  199. >>> print tabulate(table, headers, tablefmt="rst")
  200. ====== =====
  201. item qty
  202. ====== =====
  203. spam 42
  204. eggs 451
  205. bacon 0
  206. ====== =====
  207. ``mediawiki`` format produces a table markup used in `Wikipedia` and on
  208. other MediaWiki-based sites::
  209. >>> print tabulate(table, headers, tablefmt="mediawiki")
  210. {| class="wikitable" style="text-align: left;"
  211. |+ <!-- caption -->
  212. |-
  213. ! item !! align="right"| qty
  214. |-
  215. | spam || align="right"| 42
  216. |-
  217. | eggs || align="right"| 451
  218. |-
  219. | bacon || align="right"| 0
  220. |}
  221. ``moinmoin`` format produces a table markup used in `MoinMoin`
  222. wikis::
  223. >>> print tabulate(d,headers,tablefmt="moinmoin")
  224. || ''' item ''' || ''' quantity ''' ||
  225. || spam || 41.999 ||
  226. || eggs || 451 ||
  227. || bacon || ||
  228. ``youtrack`` format produces a table markup used in Youtrack
  229. tickets::
  230. >>> print tabulate(d,headers,tablefmt="youtrack")
  231. || item || quantity ||
  232. | spam | 41.999 |
  233. | eggs | 451 |
  234. | bacon | |
  235. ``textile`` format produces a table markup used in `Textile` format::
  236. >>> print tabulate(table, headers, tablefmt='textile')
  237. |_. item |_. qty |
  238. |<. spam |>. 42 |
  239. |<. eggs |>. 451 |
  240. |<. bacon |>. 0 |
  241. ``html`` produces standard HTML markup::
  242. >>> print tabulate(table, headers, tablefmt="html")
  243. <table>
  244. <tbody>
  245. <tr><th>item </th><th style="text-align: right;"> qty</th></tr>
  246. <tr><td>spam </td><td style="text-align: right;"> 42</td></tr>
  247. <tr><td>eggs </td><td style="text-align: right;"> 451</td></tr>
  248. <tr><td>bacon </td><td style="text-align: right;"> 0</td></tr>
  249. </tbody>
  250. </table>
  251. ``latex`` format creates a ``tabular`` environment for LaTeX markup,
  252. replacing special characters like ```` or ``\`` to their LaTeX
  253. correspondents::
  254. >>> print tabulate(table, headers, tablefmt="latex")
  255. \begin{tabular}{lr}
  256. \hline
  257. item & qty \\
  258. \hline
  259. spam & 42 \\
  260. eggs & 451 \\
  261. bacon & 0 \\
  262. \hline
  263. \end{tabular}
  264. ``latex_raw`` behaves like ``latex`` but does not escape LaTeX commands
  265. and special characters.
  266. ``latex_booktabs`` creates a ``tabular`` environment for LaTeX markup
  267. using spacing and style from the ``booktabs`` package.
  268. .. _Pandoc Markdown extensions: http://johnmacfarlane.net/pandoc/README.html#tables
  269. .. _PHP Markdown Extra: http://michelf.ca/projects/php-markdown/extra/#table
  270. .. _table.el: http://table.sourceforge.net/
  271. .. _org-mode: http://orgmode.org/manual/Tables.html
  272. .. _reStructuredText: http://docutils.sourceforge.net/docs/user/rst/quickref.html#tables
  273. .. _Textile: http://redcloth.org/hobix.com/textile/
  274. .. _Wikipedia: http://www.mediawiki.org/wiki/Help:Tables
  275. .. _MoinMoin: https://moinmo.in/
  276. Column alignment
  277. ~~~~~~~~~~~~~~~~
  278. ``tabulate`` is smart about column alignment. It detects columns which
  279. contain only numbers, and aligns them by a decimal point (or flushes
  280. them to the right if they appear to be integers). Text columns are
  281. flushed to the left.
  282. You can override the default alignment with ``numalign`` and
  283. ``stralign`` named arguments. Possible column alignments are:
  284. ``right``, ``center``, ``left``, ``decimal`` (only for numbers), and
  285. ``None`` (to disable alignment).
  286. Aligning by a decimal point works best when you need to compare
  287. numbers at a glance::
  288. >>> print tabulate([[1.2345],[123.45],[12.345],[12345],[1234.5]])
  289. ----------
  290. 1.2345
  291. 123.45
  292. 12.345
  293. 12345
  294. 1234.5
  295. ----------
  296. Compare this with a more common right alignment::
  297. >>> print tabulate([[1.2345],[123.45],[12.345],[12345],[1234.5]], numalign="right")
  298. ------
  299. 1.2345
  300. 123.45
  301. 12.345
  302. 12345
  303. 1234.5
  304. ------
  305. For ``tabulate``, anything which can be parsed as a number is a
  306. number. Even numbers represented as strings are aligned properly. This
  307. feature comes in handy when reading a mixed table of text and numbers
  308. from a file:
  309. ::
  310. >>> import csv ; from StringIO import StringIO
  311. >>> table = list(csv.reader(StringIO("spam, 42\neggs, 451\n")))
  312. >>> table
  313. [['spam', ' 42'], ['eggs', ' 451']]
  314. >>> print tabulate(table)
  315. ---- ----
  316. spam 42
  317. eggs 451
  318. ---- ----
  319. Number formatting
  320. ~~~~~~~~~~~~~~~~~
  321. ``tabulate`` allows to define custom number formatting applied to all
  322. columns of decimal numbers. Use ``floatfmt`` named argument::
  323. >>> print tabulate([["pi",3.141593],["e",2.718282]], floatfmt=".4f")
  324. -- ------
  325. pi 3.1416
  326. e 2.7183
  327. -- ------
  328. ``floatfmt`` argument can be a list or a tuple of format strings,
  329. one per column, in which case every column may have different number formatting::
  330. >>> print tabulate([[0.12345, 0.12345, 0.12345]], floatfmt=(".1f", ".3f"))
  331. --- ----- -------
  332. 0.1 0.123 0.12345
  333. --- ----- -------
  334. Text formatting
  335. ~~~~~~~~~~~~~~~
  336. By default, ``tabulate`` removes leading and trailing whitespace from text
  337. columns. To disable whitespace removal, set the global module-level flag
  338. ``PRESERVE_WHITESPACE``::
  339. import tabulate
  340. tabulate.PRESERVE_WHITESPACE = True
  341. Wide (fullwidth CJK) symbols
  342. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  343. To properly align tables which contain wide characters (typically fullwidth
  344. glyphs from Chinese, Japanese or Korean languages), the user should install
  345. ``wcwidth`` library. To install it together with ``tabulate``::
  346. pip install tabulate[widechars]
  347. Wide character support is enabled automatically if ``wcwidth`` library is
  348. already installed. To disable wide characters support without uninstalling
  349. ``wcwidth``, set the global module-level flag ``WIDE_CHARS_MODE``::
  350. import tabulate
  351. tabulate.WIDE_CHARS_MODE = False
  352. Multiline cells
  353. ~~~~~~~~~~~~~~~
  354. Most table formats support multiline cell text (text containing newline
  355. characters). The newline characters are honored as line break characters.
  356. Multiline cells are supported for data rows and for header rows.
  357. Further automatic line breaks are not inserted. Of course, some output formats
  358. such as latex or html handle automatic formatting of the cell content on their
  359. own, but for those that don't, the newline characters in the input cell text
  360. are the only means to break a line in cell text.
  361. Note that some output formats (e.g. simple, or plain) do not represent row
  362. delimiters, so that the representation of multiline cells in such formats
  363. may be ambiguous to the reader.
  364. The following examples of formatted output use the following table with
  365. a multiline cell, and headers with a multiline cell::
  366. >>> table = [["eggs",451],["more\nspam",42]]
  367. >>> headers = ["item\nname", "qty"]
  368. ``plain`` tables::
  369. >>> print(tabulate(table, headers, tablefmt="plain"))
  370. item qty
  371. name
  372. eggs 451
  373. more 42
  374. spam
  375. ``simple`` tables::
  376. >>> print(tabulate(table, headers, tablefmt="simple"))
  377. item qty
  378. name
  379. ------ -----
  380. eggs 451
  381. more 42
  382. spam
  383. ``grid`` tables::
  384. >>> print(tabulate(table, headers, tablefmt="grid"))
  385. +--------+-------+
  386. | item | qty |
  387. | name | |
  388. +========+=======+
  389. | eggs | 451 |
  390. +--------+-------+
  391. | more | 42 |
  392. | spam | |
  393. +--------+-------+
  394. ``fancy_grid`` tables::
  395. >>> print(tabulate(table, headers, tablefmt="fancy_grid"))
  396. ╒════════╤═══════╕
  397. │ item │ qty │
  398. │ name │ │
  399. ╞════════╪═══════╡
  400. │ eggs │ 451 │
  401. ├────────┼───────┤
  402. │ more │ 42 │
  403. │ spam │ │
  404. ╘════════╧═══════╛
  405. ``pipe`` tables::
  406. >>> print(tabulate(table, headers, tablefmt="pipe"))
  407. | item | qty |
  408. | name | |
  409. |:-------|------:|
  410. | eggs | 451 |
  411. | more | 42 |
  412. | spam | |
  413. ``orgtbl`` tables::
  414. >>> print(tabulate(table, headers, tablefmt="orgtbl"))
  415. | item | qty |
  416. | name | |
  417. |--------+-------|
  418. | eggs | 451 |
  419. | more | 42 |
  420. | spam | |
  421. ``jira`` tables::
  422. >>> print(tabulate(table, headers, tablefmt="jira"))
  423. | item | qty |
  424. | name | |
  425. |:-------|------:|
  426. | eggs | 451 |
  427. | more | 42 |
  428. | spam | |
  429. ``presto`` tables::
  430. >>> print(tabulate(table, headers, tablefmt="presto"))
  431. item | qty
  432. name |
  433. --------+-------
  434. eggs | 451
  435. more | 42
  436. spam |
  437. ``psql`` tables::
  438. >>> print(tabulate(table, headers, tablefmt="psql"))
  439. +--------+-------+
  440. | item | qty |
  441. | name | |
  442. |--------+-------|
  443. | eggs | 451 |
  444. | more | 42 |
  445. | spam | |
  446. +--------+-------+
  447. ``rst`` tables::
  448. >>> print(tabulate(table, headers, tablefmt="rst"))
  449. ====== =====
  450. item qty
  451. name
  452. ====== =====
  453. eggs 451
  454. more 42
  455. spam
  456. ====== =====
  457. Multiline cells are not well supported for the other table formats.
  458. Usage of the command line utility
  459. ---------------------------------
  460. ::
  461. Usage: tabulate [options] [FILE ...]
  462. FILE a filename of the file with tabular data;
  463. if "-" or missing, read data from stdin.
  464. Options:
  465. -h, --help show this message
  466. -1, --header use the first row of data as a table header
  467. -o FILE, --output FILE print table to FILE (default: stdout)
  468. -s REGEXP, --sep REGEXP use a custom column separator (default: whitespace)
  469. -F FPFMT, --float FPFMT floating point number format (default: g)
  470. -f FMT, --format FMT set output table format; supported formats:
  471. plain, simple, grid, fancy_grid, pipe, orgtbl,
  472. rst, mediawiki, html, latex, latex_raw,
  473. latex_booktabs, tsv
  474. (default: simple)
  475. Performance considerations
  476. --------------------------
  477. Such features as decimal point alignment and trying to parse everything
  478. as a number imply that ``tabulate``:
  479. * has to "guess" how to print a particular tabular data type
  480. * needs to keep the entire table in-memory
  481. * has to "transpose" the table twice
  482. * does much more work than it may appear
  483. It may not be suitable for serializing really big tables (but who's
  484. going to do that, anyway?) or printing tables in performance sensitive
  485. applications. ``tabulate`` is about two orders of magnitude slower
  486. than simply joining lists of values with a tab, coma or other
  487. separator.
  488. In the same time ``tabulate`` is comparable to other table
  489. pretty-printers. Given a 10x10 table (a list of lists) of mixed text
  490. and numeric data, ``tabulate`` appears to be slower than
  491. ``asciitable``, and faster than ``PrettyTable`` and ``texttable``
  492. The following mini-benchmark was run in Python 3.5.2 on Windows
  493. ::
  494. ================================= ========== ===========
  495. Table formatter time, μs rel. time
  496. ================================= ========== ===========
  497. csv to StringIO 14.5 1.0
  498. join with tabs and newlines 20.3 1.4
  499. asciitable (0.8.0) 355.1 24.5
  500. tabulate (0.8.2) 830.3 57.3
  501. tabulate (0.8.2, WIDE_CHARS_MODE) 1483.4 102.4
  502. PrettyTable (0.7.2) 1611.9 111.2
  503. texttable (0.8.8) 1916.5 132.3
  504. ================================= ========== ===========
  505. Version history
  506. ---------------
  507. - 0.8.2: Bug fixes.
  508. - 0.8.1: Multiline data in several output formats.
  509. New ``latex_raw`` format.
  510. Column-specific floating point formatting.
  511. Python 3.5 & 3.6 support. Drop support for Python 2.6, 3.2, 3.3 (should still work).
  512. - 0.7.7: Identical to 0.7.6, resolving some PyPI issues.
  513. - 0.7.6: Bug fixes. New table formats (``psql``, ``jira``, ``moinmoin``, ``textile``).
  514. Wide character support. Printing from database cursors.
  515. Option to print row indices. Boolean columns. Ragged rows.
  516. Option to disable number parsing.
  517. - 0.7.5: Bug fixes. ``--float`` format option for the command line utility.
  518. - 0.7.4: Bug fixes. ``fancy_grid`` and ``html`` formats. Command line utility.
  519. - 0.7.3: Bug fixes. Python 3.4 support. Iterables of dicts. ``latex_booktabs`` format.
  520. - 0.7.2: Python 3.2 support.
  521. - 0.7.1: Bug fixes. ``tsv`` format. Column alignment can be disabled.
  522. - 0.7: ``latex`` tables. Printing lists of named tuples and NumPy
  523. record arrays. Fix printing date and time values. Python <= 2.6.4 is supported.
  524. - 0.6: ``mediawiki`` tables, bug fixes.
  525. - 0.5.1: Fix README.rst formatting. Optimize (performance similar to 0.4.4).
  526. - 0.5: ANSI color sequences. Printing dicts of iterables and Pandas' dataframes.
  527. - 0.4.4: Python 2.6 support.
  528. - 0.4.3: Bug fix, None as a missing value.
  529. - 0.4.2: Fix manifest file.
  530. - 0.4.1: Update license and documentation.
  531. - 0.4: Unicode support, Python3 support, ``rst`` tables.
  532. - 0.3: Initial PyPI release. Table formats: ``simple``, ``plain``,
  533. ``grid``, ``pipe``, and ``orgtbl``.
  534. How to contribute
  535. -----------------
  536. Contributions should include tests and an explanation for the changes they
  537. propose. Documentation (examples, docstrings, README.rst) should be updated
  538. accordingly.
  539. This project uses `nose` testing framework and `tox` to automate testing in
  540. different environments. Add tests to one of the files in the ``test/`` folder.
  541. To run tests on all supported Python versions, make sure all Python
  542. interpreters, ``nose`` and ``tox`` are installed, then run ``tox`` in
  543. the root of the project source tree.
  544. On Linux ``tox`` expects to find executables like ``python2.6``,
  545. ``python2.7``, ``python3.4`` etc. On Windows it looks for
  546. ``C:\Python26\python.exe``, ``C:\Python27\python.exe`` and
  547. ``C:\Python34\python.exe`` respectively.
  548. To test only some Python environements, use ``-e`` option. For
  549. example, to test only against Python 2.7 and Python 3.4, run::
  550. tox -e py27,py34
  551. in the root of the project source tree.
  552. To enable NumPy and Pandas tests, run::
  553. tox -e py27-extra,py34-extra
  554. (this may take a long time the first time, because NumPy and Pandas
  555. will have to be installed in the new virtual environments)
  556. See ``tox.ini`` file to learn how to use ``nosetests`` directly to
  557. test individual Python versions.
  558. .. _nose: https://nose.readthedocs.org/
  559. .. _tox: https://tox.readthedocs.io/
  560. Contributors
  561. ------------
  562. Sergey Astanin, Pau Tallada Crespí, Erwin Marsi, Mik Kocikowski, Bill Ryder,
  563. Zach Dwiel, Frederik Rietdijk, Philipp Bogensberger, Greg (anonymous),
  564. Stefan Tatschner, Emiel van Miltenburg, Brandon Bennett, Amjith Ramanujam,
  565. Jan Schulz, Simon Percivall, Javier Santacruz López-Cepero, Sam Denton,
  566. Alexey Ziyangirov, acaird, Cesar Sanchez, naught101, John Vandenberg,
  567. Zack Dever, Christian Clauss, Benjamin Maier, Andy MacKinlay, Thomas Roten,
  568. Jue Wang, Joe King, Samuel Phan, Nick Satterly, Daniel Robbins, Dmitry B,
  569. Lars Butler, Andreas Maier, Dick Marinus.