tkinter

tkinter with matplotlib

。_饼干妹妹 提交于 2021-02-07 03:15:34
问题 I read it is possible to embed a pyplot in tkinter, but I'm having a problem: I need to display some frames, among which a pyplot in a frame of the main Tkinter window, and it has to react to my keypresses. According to http://matplotlib.org/examples/user_interfaces/embedding_in_tk.html this works: #!/usr/bin/env python from Tkinter import * import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,

tkinter with matplotlib

青春壹個敷衍的年華 提交于 2021-02-07 03:09:34
问题 I read it is possible to embed a pyplot in tkinter, but I'm having a problem: I need to display some frames, among which a pyplot in a frame of the main Tkinter window, and it has to react to my keypresses. According to http://matplotlib.org/examples/user_interfaces/embedding_in_tk.html this works: #!/usr/bin/env python from Tkinter import * import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,

tkinter with matplotlib

﹥>﹥吖頭↗ 提交于 2021-02-07 03:06:34
问题 I read it is possible to embed a pyplot in tkinter, but I'm having a problem: I need to display some frames, among which a pyplot in a frame of the main Tkinter window, and it has to react to my keypresses. According to http://matplotlib.org/examples/user_interfaces/embedding_in_tk.html this works: #!/usr/bin/env python from Tkinter import * import matplotlib matplotlib.use('TkAgg') from numpy import arange, sin, pi from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg,

After the login Button is pressed, how to obtain the value of Tkinter entry and pass it to the SQL query?

*爱你&永不变心* 提交于 2021-02-06 13:59:11
问题 In the below code two tkinter entry is created entry1 and entry2 respectively for username and password. What I am looking for is storing the value entered in the tkinter entry to the database table admin_details. But nothing is passed. Also I have no idea in using the condition i.e. " retrieve the values inserted in the tkinter entry and store the data inside the table after the button Login is pressed." Code is something like below: import MySQLdb as mdb from Tkinter import * from

After the login Button is pressed, how to obtain the value of Tkinter entry and pass it to the SQL query?

試著忘記壹切 提交于 2021-02-06 13:58:08
问题 In the below code two tkinter entry is created entry1 and entry2 respectively for username and password. What I am looking for is storing the value entered in the tkinter entry to the database table admin_details. But nothing is passed. Also I have no idea in using the condition i.e. " retrieve the values inserted in the tkinter entry and store the data inside the table after the button Login is pressed." Code is something like below: import MySQLdb as mdb from Tkinter import * from

Vertical and Horizontal Scrollbars on Tkinter Widget

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 11:14:08
问题 I am trying to output the contents of a database to a Tkinter widget. The database has enough rows and columns to where I need to have both horizontal and vertical scrollbars enabled, but I am having a hard time getting horizontal and vertical scrolling to work simultaneously. I am agnostic about which Tkinter widget is used but here is my current implementation: # Create root self.root = Tk() self.root.geometry('1000x500+0+0') # Create canvas self.canvas = Canvas(self.root) self.canvas.pack

Vertical and Horizontal Scrollbars on Tkinter Widget

ぃ、小莉子 提交于 2021-02-06 11:13:52
问题 I am trying to output the contents of a database to a Tkinter widget. The database has enough rows and columns to where I need to have both horizontal and vertical scrollbars enabled, but I am having a hard time getting horizontal and vertical scrolling to work simultaneously. I am agnostic about which Tkinter widget is used but here is my current implementation: # Create root self.root = Tk() self.root.geometry('1000x500+0+0') # Create canvas self.canvas = Canvas(self.root) self.canvas.pack

Tkinter OpenGL context in Python

岁酱吖の 提交于 2021-02-05 19:56:38
问题 I need to create an OpenGL context in Tkinker, for using it with PyOpenGL Python module. Tkinker doesn't natively support OpenGL context, but I found this page on PyOpenGL docs, explaining how to use a wrapper included in the module for this: http://pyopengl.sourceforge.net/documentation/context/ I tried to run the provided code but I got a message saying TOGL module was not found. I downloaded the module from http://togl.sourceforge.net/, but couldn't get it to work. PS. I did the test on

AttributeError: 'function' object has no attribute error [closed]

情到浓时终转凉″ 提交于 2021-02-05 12:27:54
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Improve this question #-*- coding: cp857 -*- from tkinter import * ########################################################### rt=Tk() rt.title("MY FILM ARCHIVE v1") rt.resizable(False, False) ########################################################### def add(): def addFilm(): db =

how to print previous 30 days from a date in python and the same in Tkinter

人走茶凉 提交于 2021-02-05 12:24:05
问题 I am using Tkinter to build a Corona Travel History Questionnaire. The front end has options to select a particular date - " D-Day Cronoa Confirmed". Once the D-day is confirmed, the program is supposed to give fields for entering data on travel history. I am using tkcalendar module in Python. Problem: How to print the previous 30 days from a given date in python? Question: Can we do anything in tkcalendar to print the last 30 days from a selected date in the window itself? 回答1: Using the