Document viewer widget for Tkinter
Project description
__ __ ___ _ ___
/ /_/ /__ / _ \___ ___| | / (_)__ _ _____ ____
/ __/ '_// // / _ \/ __/ |/ / / -_) |/|/ / -_) __/
\__/_/\_\/____/\___/\__/|___/_/\__/|__,__/\__/_/
tkDocViewer is a document viewer widget for Python + Tkinter.
It is primarily intended for displaying file previews.
Currently supported file types include:
* Plain text
* PDF, Postscript (requires an external Ghostscript binary)
* PNG, GIF, JPEG (requires PIL)
tkDocViewer is designed to be simple above all else. All dependencies
outside the Python standard library are optional (though file type
support will be limited). Its API is designed to let you accomplish
tasks with as few method calls as possible.
This emphasis on simplicity does come with some performance costs.
It is not necessarily the fastest nor the most resource-efficient
viewer, but it should generally run well enough to get the job done.
Both Python 2 and 3 are supported, on Windows and Unix platforms.
Usage
-----
tkDocViewer consists of a single module, tkdocviewer (note the module
name is lowercase), which exports a single class, DocViewer.
A brief example program:
# This assumes Python 3
from tkinter import *
from tkdocviewer import *
# Create a root window
root = Tk()
# Create a DocViewer widget
v = DocViewer(root)
v.pack(side="top", expand=1, fill="both")
# Display this README file
v.display_file("README")
# Start Tk's event loop
root.mainloop()
For more documentation, try "python -m pydoc tkdocviewer".
Dependencies
------------
Most file formats require third-party modules or external applications.
tkDocViewer will still run without them, but file format support will be
limited by what's available on your system.
* Ghostscript (https://ghostscript.com/)
External application
Required for PDF and Postscript support.
* Pillow (https://python-pillow.org/)
Python module
Required for most image formats; optional for PDF support.
Copyright and License
---------------------
tkDocViewer is released under the MIT License. See the LICENSE file
for more information.
Third-party Python modules (i.e., not part of the standard library)
used by tkDocViewer are licensed under similarly permissive terms.
See each module's documentation for details.
External applications may have different license terms. For example,
as of this writing (2018-08-18) Ghostscript uses the GNU Affero GPL.
See each application's documentation for details.
/ /_/ /__ / _ \___ ___| | / (_)__ _ _____ ____
/ __/ '_// // / _ \/ __/ |/ / / -_) |/|/ / -_) __/
\__/_/\_\/____/\___/\__/|___/_/\__/|__,__/\__/_/
tkDocViewer is a document viewer widget for Python + Tkinter.
It is primarily intended for displaying file previews.
Currently supported file types include:
* Plain text
* PDF, Postscript (requires an external Ghostscript binary)
* PNG, GIF, JPEG (requires PIL)
tkDocViewer is designed to be simple above all else. All dependencies
outside the Python standard library are optional (though file type
support will be limited). Its API is designed to let you accomplish
tasks with as few method calls as possible.
This emphasis on simplicity does come with some performance costs.
It is not necessarily the fastest nor the most resource-efficient
viewer, but it should generally run well enough to get the job done.
Both Python 2 and 3 are supported, on Windows and Unix platforms.
Usage
-----
tkDocViewer consists of a single module, tkdocviewer (note the module
name is lowercase), which exports a single class, DocViewer.
A brief example program:
# This assumes Python 3
from tkinter import *
from tkdocviewer import *
# Create a root window
root = Tk()
# Create a DocViewer widget
v = DocViewer(root)
v.pack(side="top", expand=1, fill="both")
# Display this README file
v.display_file("README")
# Start Tk's event loop
root.mainloop()
For more documentation, try "python -m pydoc tkdocviewer".
Dependencies
------------
Most file formats require third-party modules or external applications.
tkDocViewer will still run without them, but file format support will be
limited by what's available on your system.
* Ghostscript (https://ghostscript.com/)
External application
Required for PDF and Postscript support.
* Pillow (https://python-pillow.org/)
Python module
Required for most image formats; optional for PDF support.
Copyright and License
---------------------
tkDocViewer is released under the MIT License. See the LICENSE file
for more information.
Third-party Python modules (i.e., not part of the standard library)
used by tkDocViewer are licensed under similarly permissive terms.
See each module's documentation for details.
External applications may have different license terms. For example,
as of this writing (2018-08-18) Ghostscript uses the GNU Affero GPL.
See each application's documentation for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tkDocViewer-1.0.tar.gz
(15.1 kB
view details)
Built Distribution
File details
Details for the file tkDocViewer-1.0.tar.gz
.
File metadata
- Download URL: tkDocViewer-1.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91b5564a5dc88c944eb081e092c81f65e8225a6c39536476a233ecb79c4188e |
|
MD5 | cc3ad469821b51674713109d88114b3d |
|
BLAKE2b-256 | 2d7a822671d56b4d5d99cbadd2a38b3aa88c3cc984b0712818890e80b36612c2 |
File details
Details for the file tkDocViewer-1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: tkDocViewer-1.0-py2.py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8cbc3f0c866737987fa8105465077024ddd1431956dead949b880038f9382c9 |
|
MD5 | d89706bd40d90cf177edd78d6502d26f |
|
BLAKE2b-256 | b83369456a234a9297de1c60459ef7f956140db3bdba2c7f7044de94bfc9495f |