Skip to main content

Latest Version Supported Python versions License

Tabview

View a CSV file in a spreadsheet-like display.

Posted by Scott Hansen tech@firecat53.net

Original code forked from: http://www.amk.ca/files/simple/tabview.txt

Contributed by A.M. Kuchling amk@amk.ca

Other Contributors:

The highlighted position is shown in the top-left corner of the screen; next to it are shown the contents of that cell.

Features

  • Python 3.11+
  • Spreadsheet-like view for easily visualizing tabular data
  • Vim-like navigation (h,j,k,l, g(top), G(bottom), 12G goto line 12, m - mark, ' - goto mark, etc.)
  • Toggle persistent header row
  • Sort ascending or descending by any column. Dynamically change column width and gap
  • Sort in 'natural order' to improve numeric sorting
  • Full-text incremental search, n and p to cycle between search results
  • 'Enter' to view the full cell contents
  • Yank cell contents to the clipboard
  • File can be reloaded in-place if the data changes.
  • F1 or ? for keybindings
  • Can also use from python command line to visualize any tabular data (e.g. list-of-lists)
  • See the screenshots directory for some pictures.

Requires

  • Python 3.11+
  • wl-copy (Wayland), xclip or xsel (X11), or pbcopy (macOS) (Optional - only required for 'yank' to clipboard)

Installation

  • pipx install tabview OR
  • pip install tabview OR
  • pip install . (from a source checkout) OR
  • Archlinux AUR package

Usage

  • From command line:

    tabview <filename>
    tabview <filename> --start_pos 6,5
    tabview <filename> +6:5  # equivalent to previous usage
    tabview <filename> --encoding iso8859-1 +6:
    
  • From python command line to view an object:

    import tabview as t
    
    a = [["a", "b", "c"], ["d", "e", "f"]]
    t.view(a)
    
  • From python command line to view a file:

    import tabview as t
    t.view(<filename>, start_pos=(60,40))
    
  • Using as the pager for MySQL. Set these options in ~/.my.cnf:

    pager=tabview -d '\t' --quoting QUOTE_NONE -
    silent
    

Tests

  • make test (creates a .venv), or python -m unittest discover. The integration tests need a terminal.

Keybindings

F1 or ?                   Show this list of keybindings
Cursor keys or h,j,k,l    Move the highlighted cell, scrolling if required.
Q or q                    Quit
Home, ^, Ctrl-a           Move to the start of this line
End, $, Ctrl-e            Move to the end of this line
[num]|                    Goto column <num>, or first column
                          if num not given
PgUp/PgDn or J/K          Move a page up or down
H,L                       Page left or right
g                         Goto top of current column
[num]G                    Goto line <num> or bottom of current column
                          if num not given
Ctrl-g                    Show file/data information
Insert or m               Memorize this position
Delete or '               Return to memorized position (if any)
Enter                     View full cell contents in pop-up window.
/                         Search
n                         Next search result
p                         Previous search result
t                         Toggle fixed header row
< >                       Decrease/Increase column width (all columns)
, .                       Decrease/Increase column width (current column)
- +                       Decrease/Increase column gap
s                         Sort the table by the current column (ascending)
S                         Sort the table by the current column (descending)
a                         'Natural Sort' the table (ascending)
A                         'Natural Sort' the table (descending)
#                         Sort numerically by the current column (ascending)
@                         Sort numerically by the current column (descending)
r                         Reload file/data. Also resets sort order
y                         Yank cell contents to the clipboard
                          (requires wl-copy, xclip, xsel or pbcopy)
[num]c                    Toggle variable column width mode (mode/max),
                          or set width to [num]
[num]C                    Maximize current column, or set width to [num]
[num][                    Skip to (nth) change in row value (backward)
[num]]                    Skip to (nth) change in row value (forward)
[num]{                    Skip to (nth) change in column value (backward)
[num]}                    Skip to (nth) change in column value (forward)

Metadata

Release files for tabview 1.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tabview 1.5.0
File Size Uploaded
tabview-1.5.0.tar.gz 56.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tabview 1.5.0
File Interpreter ABI Platform
tabview-1.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.6 kB

Release files / tabview-1.5.0.tar.gz

Download URL tabview-1.5.0.tar.gz
Size 56.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d28f1a638c5bcf01280b8fc292a83caa872a5001293f04dcb35a9afe60bd7c96
BLAKE2b-256 checksum
How to use checksums
1ab0b0e7b597357942b8cf23a09a3805ea6226fce5325d7315aa5d90076893b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / tabview-1.5.0-py3-none-any.whl

Download URL tabview-1.5.0-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f8127816a45358becb5772205ffb8b59efdf115a3a3a0d958fba912078eb7846
BLAKE2b-256 checksum
How to use checksums
d64138d37dfa7da836c85d62e9c557b61c2c15fc359c841823fa236bb9247972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.5.0 This release

2 release files

1.4.4

1 release file

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page