firecat53: Happy to merge this. Can you please provide unit tests?
asparagii: Sure thing. Where should I put them? Everything in the same file?
diff --git a/tabview/tabview.py b/tabview/tabview.py
index c98188a..b7f441c 100644
--- a/tabview/tabview.py
+++ b/tabview/tabview.py
@@ -25,6 +25,11 @@ from textwrap import wrap
 import unicodedata
 import shlex
 
+if sys.version_info.major < 3:
+    from urlparse import urlparse
+else:
+    from urllib.parse import urlparse
+
 
 if sys.version_info.major < 3:
     # Python 2.7 shim
@@ -1356,7 +1361,8 @@ def view(data, enc=None, start_pos=(0, 0), column_width=20, column_gap=2,
         while True:
             try:
                 if isinstance(data, basestring):
-                    with open(data, 'rb') as fd:
+                    parsed_path = parse_path(data)
+                    with open(parsed_path, 'rb') as fd:
                         new_data = fd.readlines()
                         if info == "":
                             info = data
@@ -1395,3 +1401,8 @@ def view(data, enc=None, start_pos=(0, 0), column_width=20, column_gap=2,
     finally:
         if lc_all is not None:
             locale.setlocale(locale.LC_ALL, lc_all)
+
+
+def parse_path(path):
+    parse_result = urlparse(path)
+    return parse_result.path

File URI scheme not supported
File URI scheme as filename is not supported:

`$ tabview file://home/asparagii/test.csv` leads to a FileNotFoundException
diff --git a/test/test_tabview.py b/test/test_tabview.py
index b82c38e..91f4409 100644
--- a/test/test_tabview.py
+++ b/test/test_tabview.py
@@ -107,6 +107,26 @@ class TestTabviewUnits(unittest.TestCase):
                 i = str(i)
             self.assertEqual(i, res[0][j])
 
+    def test_tabview_uri_parse(self):
+        # Strip 'file://' from uri (three slashes)
+        path = t.parse_path('file:///home/user/test.csv')
+        self.assertEqual(path, '/home/user/test.csv')
+
+        # Two slashes
+        path = t.parse_path('file://localhost/test.csv')
+        self.assertEqual(path, '/test.csv')
+
+        # Don't change if no 'file://' in string
+        path = t.parse_path('/home/user/test.csv')
+        self.assertEqual(path, '/home/user/test.csv')
+
+        # Don't change if relative path
+        path = t.parse_path('../test.csv')
+        self.assertEqual(path, '../test.csv')
+
+        path = t.parse_path('test.csv')
+        self.assertEqual(path, 'test.csv')
+
 
 class TestTabviewIntegration(unittest.TestCase):
     """Integration tests for tabview. Run through the curses routines and some

pip install -e .
parse_log_pytest
pytest
pytest
apt-get update apt-get install -y gcc
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
packaging @ file:///croot/packaging_1734472117206/work
pluggy @ file:///croot/pluggy_1733169602837/work
pytest @ file:///croot/pytest_1738938843180/work
-e git+https://github.com/TabViewer/tabview.git@b73659ffa8469d132f91d7abf3c19e117fe8b145#egg=tabview
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work

name: tabview
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
prefix: /opt/conda/envs/tabview

test/test_tabview.py::TestTabviewUnits::test_tabview_uri_parse
test/test_tabview.py::TestTabviewIntegration::test_tabview_annotated_comment test/test_tabview.py::TestTabviewIntegration::test_tabview_latin1 test/test_tabview.py::TestTabviewIntegration::test_tabview_list test/test_tabview.py::TestTabviewIntegration::test_tabview_unicode test/test_tabview.py::TestTabviewIntegration::test_tabview_windows_newlines
test/test_tabview.py::TestTabviewUnits::test_tabview_encoding_latin1 test/test_tabview.py::TestTabviewUnits::test_tabview_encoding_utf8 test/test_tabview.py::TestTabviewUnits::test_tabview_file_annotated_comment test/test_tabview.py::TestTabviewUnits::test_tabview_file_latin1 test/test_tabview.py::TestTabviewUnits::test_tabview_file_unicode
tabview/tabview.py
tabview/tabview.py