Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- #
- # Support module generated by PAGE version 4.21
- # in conjunction with Tcl version 8.6
- # Mar 05, 2019 04:45:41 AM CST platform: Linux
- import sys
- from pandastable import Table
- try:
- import Tkinter as tk
- except ImportError:
- import tkinter as tk
- try:
- import ttk
- py3 = False
- except ImportError:
- import tkinter.ttk as ttk
- py3 = True
- def on_btnExit():
- print('pandastabledemo_support.on_btnExit')
- sys.stdout.flush()
- destroy_window()
- def init(top, gui, *args, **kwargs):
- global w, top_level, root
- w = gui
- top_level = top
- root = top
- # Our init code starts here
- csvfile = "BreadBasket.csv"
- # Init the pandastable, setting the parent (w.frmCustomWidget) and
- # set the showtoolbar and showstatusbar parameters to True
- pt = Table(w.frameCustom, showtoolbar=True, showstatusbar=True)
- # Show the table
- pt.show()
- # Import the CSV into the widget
- pt.importCSV(csvfile)
- # update the widget
- pt.update()
- def destroy_window():
- # Function which closes the window.
- global top_level
- top_level.destroy()
- top_level = None
- # Replace the "generic" assignment for the custom control with the correct one
- # for our pandastable instance.
- # Custom = tk.Frame # To be updated by user with name of custom widget.
- Custom = Table
- if __name__ == '__main__':
- import pandastabledemo
- pandastabledemo.vp_start_gui()
- # ======================================================
- # End of pandastabledemo_support.py
- # ======================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement