openzoom / deepzoom.py

Python Deep Zoom Tools
http://openzoom.org/
Other
176 stars 74 forks source link

Fix opening local files on windows in python 3.x #25

Open sicklydove opened 1 year ago

sicklydove commented 1 year ago

Fixes an issue when opening local files in Windows, where filepaths are loaded with the format:

C:\some\path\to\a\file.jpg

Whereas they are required to be of the format:

C:/some/path/to/a/file.jpg

Without this change, safe_open throws a URLError (file not found) in urllib.open_local_file

Please note: This has only been tested on Windows.