What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-14 23:21:01
python code to display a grid of data table
try: from tkinter import * from tkinter.ttk import *except ImportError : print("exception in importing module") class MyWindow(Frame): def CreateUI(self): tv = Treeview(self) tv['columns'] = ('Name', 'Mobile', 'course'... Add solution -
Python 2021-09-14 09:25:03
how to get checkbutton from a list
from Tkinter import * root = Tk() users = ['Anne', 'Bea', 'Chris'] for x in range(len(users)): l = Checkbutton(root, text=users[x][0], variable=users[x]) print "l = Checkbutton(root, text=" + str(users[x][0]) + ", variable=&q... Add solution -
Python 2021-09-11 01:52:02
new tab in tkinter
from tkinter import * from tkinter.ttk import Notebook # import Notebook # create new window root = Tk() # create tabcontrol tabcontrol = Notebook(root) # create a number of tabs you want to add tab1 = Frame(tabcontrol) tab2 = Frame(tabcontrol) # ad... Add solution -
Python 2021-09-10 07:30:03
python tkinter save entry data in txt file
# Save data from entry widget to a text file: from tkinter import * def save_data(): name_info = name.get() f = open("text_file.txt", "w") f.write(name_info + "\n") f.close() root = Tk() name = StringVar() Entry(... Add solution -
Python 2021-09-06 15:07:02
screenshot taker python
from tkinter.filedialog import * import pyautogui import tkinter root = Tk() root.title('Take A Screenshot') root.geometry('300x300') canvas = tkinter.Canvas(root, width=300, height=300) canvas.pack() def takeScreenshot(): img = pyautogui.screensh... Add solution -
Python 2021-09-06 03:39:01
python tkinter plot points
from tkinter import * from tkinter.ttk import * import matplotlib matplotlib.use("TkAgg") from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg root = Tk() figure = Figure(figsize=(5, 4), dpi=10... Add solution
Best helpers
Ranking is empty