Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tkDataCanvas

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tkDataCanvas

Tabular data display widget for Tkinter

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

tkDataCanvas is a tabular data display widget for Python + Tkinter. It is intended as a more efficient replacement for tkMagicGrid and tkScrolledFrame for displaying large amounts of static data.

tkDataCanvas is designed to be simple above all else. It has no dependencies outside the Python standard library. Its API is designed to let you accomplish tasks with as few method calls as possible.

Both Python 2 and 3 are supported, on Windows and Unix platforms.

Usage

tkDataCanvas consists of a single module, tkdatacanvas (note the module name is lowercase), which exports a single class, DataCanvas.

A brief example program:

#!/usr/bin/env python3

from tkinter import *
from tkdatacanvas import DataCanvas
import io
import csv

# Create a root window
root = Tk()

# Create a DataCanvas widget
dc = DataCanvas(root)
dc.pack(side="top", expand=1, fill="both")

# Display the contents of some CSV file
with io.open("test.csv", "r", newline="") as csv_file:
    reader = csv.reader(csv_file)
    parsed_rows = 0
    for row in reader:
        if parsed_rows == 0:
    	    # Display the first row as a header
    	    dc.add_header(*row)
        else:
    	    dc.add_row(*row)
        parsed_rows += 1
dc.display()

# Start Tk's event loop
root.mainloop()

For detailed documentation, try python -m pydoc tkdatacanvas.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc