Tagged Questions
1
vote
0answers
6 views
choosing in which desktop Tkinter.Tk() opens the the new window
I am on Linux/CentOS. I have multiple desktop.
When I launch this code,and in the meanwhile I change the desktop, the window opens in the current desktop and not in the original one (from which the ...
0
votes
1answer
17 views
Python: Tkinter - I am creating a bunch of “+1” texts but their not deleting and they are lagging my game up, help please
so basically the "+1", "+2" texts I'm creating for my game that is like cookie clicker aren't deleting and its lagging up the game hard. I need some help, heres the code.
def update1Positions():
...
0
votes
1answer
22 views
Import an image as a background in Tkinter
I've searched some other questions that many people did ask here about how can someone import an image as a background from Tkinter and I've got to say that I wasm't helped a lot.
Let me explain to ...
0
votes
2answers
45 views
Why am I receiving a value error
The error that I am receiving is ValueError: invalid literal for int() with base 10: '' , when I click the Decimal to Binary button.
I also am also getting ValueError: invalid literal for int() with ...
0
votes
0answers
14 views
Raise event in Tkinter from command line (windows)
I'd like to use Tkinter to run in the background, so that I can do some operations that take a long time when my program starts up, and then call functions on demand. A smallish example of what I mean
...
-2
votes
1answer
22 views
My entry box always returns PY_VAR1 value!!though I'm using the .get function
please take a look at my code, it's really simple I need to take the value from the entry box and use it in my program and when pressing the add button I print it ,it keeps giving me this value ...
-1
votes
0answers
20 views
A multicolumns listbox with tkinter and Python 3.3 [on hold]
I'm trying, as the title explains, to make a multicolumns listbox with tkinter and Python 3.3.
I'd like something that looks like the following:
How can I do it ?
Thank you in advance
0
votes
0answers
14 views
Installing Tkinter on Python 2.6.6 Red Hat 4.4.5-6 [on hold]
I'm using Python 2.6.6 using GCC 4.4.5 20110214 (Red Hat 4.4.5-6) on linux2 and looking for a way to install Tkinter. Thanks for the help in advance.
0
votes
1answer
13 views
tkinter- Scrollbar connected to text widget is visible, but there isn't any slider.
I'm building a program that needs to display a large amount of text, and I need to have a scrollbar attached to a Text widget.
I'm using Windows 7 , python 3.3...
Here's a small(est possible) ...
0
votes
0answers
33 views
Weird error that comes up during python program run
Whenever I run my program I get this error. Do you know what this means?
This happens when the
turtle.clear()
function is called
File "C:\Python32\lib\turtle.py", line 2642, in clear
...
0
votes
1answer
14 views
Python - Tkinter RadioButton If Statement
I've got a radio button which lets me select 0, 1 or 2. The following script prints 0, 1 or 2 in the terminal, but I want it to do 'stuff' depending on what I select.
For example, If I select 0, I ...
1
vote
1answer
20 views
Restricting the value in Tkinter Entry widget: Why can't I delete the first character?
This example successfully allows entry of only numbers, but after the first character is entered, it doesn't allow you do delete it. Why is this happening?
import Tkinter as tk
class window2:
...
0
votes
1answer
34 views
how to combine pygame and tkinter? [on hold]
I have python snake game which is written by pygame and i have a start window(like the ones you see at the start of games) which is written with tkinter.I want to combine them;first the tkinter window ...
0
votes
1answer
15 views
Python3 Tkinter popup menu not closing automatically when clicking elsewhere
I'm running Python 3.3.3 (and right now I'm on Ubuntu but I also develop on Mac and Windows, which I haven't yet tested). I have a Treeview object that responds to right click on items and shows a ...
0
votes
1answer
21 views
Circle and line collision detection in python tkinter
I writing a python program in which a circle bounces off of user drawn lines. There are multiple circles that bounce off the wall. For each one, the shortest distance from the center of the circle and ...
2
votes
1answer
28 views
Embedding a matplotlib animation into a tkinter frame
For a project I am working on a simple harmonic motion simulator (How a mass oscillates over time). I have got the data produced correctly and already have a graph produced within a tkinter frame ...
0
votes
1answer
18 views
Gedit problems with python
I'm just learning Python in school and we were suppose to draw something (code it in gedit for python) on canvas (Tkinter). Instead of getting something drawn up I only get an empty canvas. It looks ...
2
votes
0answers
31 views
Text Label in Tkinter not Updating - Windows 7
I am trying to make use of text labels in a simple Tkinter GUI running on Windows 7. I cannot get the text labels to update when I use the set method of their associated StringVars. The following ...
0
votes
1answer
17 views
tkinter >> how to get button references?
I am currently trying to create a battleship game with Python and tkinter.
I need to declare 100 buttons (one for each spot that a player can fire on), and I figured out that I could do this to get ...
1
vote
4answers
61 views
Why is the function being seen as a global variable
The error that I am receiving is: Global name 'OnButtonClick2' is not defined. I am not sure if the program is reading the function as a variable instead of as a function, and I don't know what I ...
0
votes
1answer
10 views
Tkinter Freezing when calling Pyserial Function from Button
I am creating a graphical interface for my serial communications program. The layout for the gui is set up how I want and I have begun to try and add some of the serial code. However, I have run ...
0
votes
1answer
23 views
Python - tkinter - How to move messagebox to foreground
from tkinter import messagebox
Tk().withdraw()
acceptInput=messagebox.askquestion("Input Assessment","do you accept this input?")
The askquestion window box is appearing in the background rather ...
1
vote
1answer
32 views
Embedding an animated matplotlib in tk
I am fairly new to python and a real beginner to tkinter and matplotlib.
I have the following code which essentially is a testbed for what I eventually want to do.
#!/usr/bin/env python
import ...
0
votes
0answers
29 views
Tkinter Can't figure out how to clear all the text in a Text widget and then immediately rewrite it
I'm trying to clear and rewrite the text in a text widget in the same function. Here is the function.
Here's the function...
def delete_individual(self):
"""
Deletes a single row in ...
0
votes
1answer
27 views
Where to place the code to remove a tkinter widget from a window
To remove a button when using tkinter, I am aware that I am supposed to use grid_remove. Where should the command be placed though, and what would the line code that removes it look like?
This is ...
-1
votes
1answer
22 views
urllib.urlretrieve file python 3.3
I know I have seen the answer somewhere a couple of weeks ago but I can't find it now.
Simple urllib.urlretrieve in Python 3.3. How do you do it? I'm trying to download an mp4/html(Page does not ...
0
votes
1answer
17 views
padx on Tkinter Frame in python produces different spacing on different machines
Are there any factors that would cause the padx option of a Tkinter Frame to result in different sizes on different screens/OS? I am developing on Linux and I have a set of icons lined up using the ...
1
vote
3answers
33 views
pong game two players tkinter error
i tried to execute this code:
import Tkinter as tk
import tkFont
import functools
import math
import random
import time
class Pong(tk.Canvas):
DEFAULTS = dict(width=640, ...
-1
votes
1answer
16 views
Having Trouble Formatting Grid Layout in Tkinter
I am trying to make a basic GUI for a serial communications program I wrote. I am new to Tkinter but not new to python. I am having trouble getting everything to work out with the grid. I know this is ...
0
votes
4answers
50 views
On python, how do I determine which button was clicked
How would I run an if statement to determine which button was clicked? I've been looking around, but I am new to Tkinter and I'm not too sure what I'm supposed to do.
self.button1 = ...
0
votes
1answer
17 views
Python tkinter threading trouble .delete(ALL)
This may simply be the limitation of Tkinter being main thread op primarily. Is there a way to canvas.delete(ALL) in Tkinter when also using threads. I have the program running, the long way around ...
0
votes
0answers
12 views
Destroying a Toplevel in a thread locks up root
I have a program I've been writing that began as a helper function for me to find a certain report on a shared drive based on some information in that report. I decided to give it a GUI so I can ...
0
votes
1answer
15 views
Python: Tkinter - One animation stops when the other begins
for plusOneFrames in range(0, 25):
xxUL = xxUL + 0
yyUL = yyUL - 5
myText = screen.create_text( xxUL, yyUL, text = "+1", font = "Arial 25", fill = "black" )
screen.update()
...
0
votes
0answers
24 views
Python Tkinter application causes fork() / exec() error on Mac OS X
I'm running a python (2.7) Tkinter GUI application on Mac OS X (10.7 and 10.8). The UI is in a separate process that gets forked off from the main script using multiprocessing. When I run, however, it ...
0
votes
3answers
21 views
Python - tkinter - How to capture bind function
from tkinter import StringVar, messagebox, Entry, Tk
def accept(event):
acceptInput=messagebox.askquestion("Input Assessment","do you accept this input?")
return acceptInput
window=Tk()
...
0
votes
2answers
19 views
Need to use TkApp backend with matplotlib in Pyzo
I'm trying to put a live mass spectrum plot into a program that I am writing. So far I have a simple GUI that give the program its basic functionality. I also want it to have a live plot of a mass ...
1
vote
1answer
19 views
Python - What is tkinter's default window reference?
import tkinter.messagebox
a=tkinter.messagebox.askquestion('','hi')
After the 'askquestion' window closes the tkinter window still remains.
I can resolve this by the following:
import ...
0
votes
0answers
30 views
ImportError using matplotlib TKinter Backend
I'm developing a user interface in python using the Tkinter interface and the matplotlib TkAgg backend for drawing graphs on a Linux machine. A week ago, I had a working code, but then some system ...
1
vote
1answer
17 views
tkinter: How to detect when a pressed mouse enters a widget in a different Frame
I have a ttk Treeview (in a Frame in a Tk)) and a tk Listbox (in a Toplevel). My intention is to do the following:
press mouse button 1 in the Treeview
move (the pressed) mouse over to the Listbox
...
0
votes
1answer
26 views
Loop with after() in Tkinter
I am a newbie with Tkinter and am still very unsure of the things I am trying to do, hopefully it is not to stupid. Every help is welcome.
I want to use my Rasberry Pi to controll some motors. These ...
0
votes
0answers
24 views
Python threading with tkinter
Back to working on a program I started and partially finished back in late Nov/early Dec.
I want to send a value to a program/thread, reset the value and do it again, 11 times. The programs/threads ...
0
votes
1answer
60 views
Why does my button only work once in Python?
I created a button to call my main_menu function when it is clicked, but it can only be clicked once. When it is clicked, it brings the user back to the main menu, but if the user leaves the main menu ...
0
votes
1answer
26 views
Python Tkinter - Image not displaying
I'm writing a short script to display a user selected image in a canvas. The image the user selects could be different sizes. In the long run I want to have the application maximise and present scroll ...
0
votes
1answer
31 views
How can i create a GUI using Tkinter that can operate on a function and still accept input?
I have been trying to program a GUI for a timer ALL weekend... I'm about to just give up because I cannot find any information on how to do this correctly..
I have tried threading after someone told ...
0
votes
1answer
17 views
Why is my Toplevel() widget freezing my program on Windows but not ubuntu?
I have some source that i hammered out this weekend that is supposed to be a personal time management program for work. The modules used are, Tkinter, time, thread, textwrap and datetime.
I finished ...
0
votes
0answers
15 views
Tkinter frame with scrollbars cutting off some data
I'm trying to populate a Tk frame with checkboxes. I'm able to list them on the frame and make the list scroll, however, after a certain number of items being listed (which seems to vary depending on ...
0
votes
0answers
29 views
PIL/tkinter - updating label image with button images
I'm trying to implement my simple image viewer, where I have one main label and menubutton with three choices. Each of them creates different numbers of buttons with pictures inside them. I would like ...
1
vote
2answers
25 views
Updating Python Tkinter GUI using .after method
I have a listbox that I want to update every minute or so. It pulls XML data, parses it and put it into the list box automatically. I have figured out to use the .after method but upon implementing it ...
0
votes
1answer
23 views
Tkinter countdown + Button
Hello I would like to create a countdown timer with button and entry. It should work like this: When i will start program i want to write some numbers to entry and then there should be button start ...
-1
votes
1answer
47 views
How I do a window for this Sudoku?
from Tkinter import*
class sudoku:
def __init__(self, juego):
try:
for i in range(9):
for j in range(9):
if ...