I need to create a simple windows based GUI for a desktop application that will be downloaded by end users. The application is written in python and will be packaged as an installer or executable.
The functionality I need is simple - selecting from various lists, showing progress bars, etc. No animations, sprites, or other taxing/exoti...
I'm looking for the same effect as alert() in JavaScript.
I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the client comes and grabs it and executes it. I want to be able to make a simple popup message, without having to re-write a whole bunch of bo...
I have a python program which opens a new windows to display some 'about' information. This window has its own close button, and I have made it non-resizeable. However, the buttons to maximize and minimize it are still there, and I want them gone.
I am using Tkinter, wrapping all the info to display in the Tk class.
The code so far is...
I have a dense set of points in the plane. I want them colored so that points that are close to each other have the same color, and a different color if they're far away. For simplicity assume that there are, say, 5 different colors to choose from. Turns out I've not the slightest idea how to do that ..
I'm using Tkinter with Python, by...
I'm trying to make a simple program that continually displays and updates a label that displays the CPU usage, while having other unrelated things going on.
I've done enough research to know that threading is likely going to be involved. However, I'm having trouble applying what I've seen in simple examples of threading to what I'm try...
How do I make a python window always be on bottom?
...
I tried renaming my .py file to .pyw. But compiling with py2exe does not make a difference.
I tried using root.withdraw() but all it does is freeze the application, prevent the initial canvas from popping up, and fail to remove the command prompt window anyways.
Does anyone have a solution?
My root is:
root = Tk()
...
I wrote a CPU monitoring program in Python. For some reason sometimes the the program will run without any problem. Then other times the program won't even start because of the following error.
Traceback (most recent call last):
File "", line 244, in run_nodebug
File "C:\Python26\CPUR1.7.pyw", line 601, in
app = simpleapp_tk(N...
How do I do a command that will set the default value on a Tkinter spinbox widget?
For some reason they didn't give it the attribute .set()
...
In the following code I'll get the following error if I right click the window that pops up. Then go down to the very bottom entry widget then delete it's contents. It seems to be giving me a TclError. How do I go about handeling such an error?
The Error
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Pytho...
I'm trying to grab a screenshot every 30 seconds and display it on my GUI, heres what I've got so far.
Code:
from Tkinter import *
from PIL import ImageGrab
window = Tk()
box = (100,100,400,400)
MyImage = ImageGrab.grab(box)
MyPhotoImage = PhotoImage(file=MyImage) #I know this is where its going wrong, just not sure how to fix it
Pi...
I noticed that in my version of Tkinter, the after() call does not survive system clock rewinding.
If the after(x, func) was called, and the system clock was rewinded, func will be called only after the clock returned to its time before the rewind + x milliseconds.
I assume this is because Tkinter uses the system-clock instead of the "...
i tried to figure out what tags were in canvas however i am having a hard time understanding it. can someone explain what tags do and how to use them in canvas when using python.
...
I am using Python to parse entries from a log file, and display the entry contents using Tkinter and so far it's been excellent. The output is a grid of label widgets, but sometimes there are more rows than can be displayed on the screen. I'd like to add a scrollbar, which looks like it should be very easy, but I can't figure it out.
Th...
In Tkinter I'm trying to make it so when a command is run a widget is automatically selected, so that a one may bind events to the newly selected widget.
Basically I want it so when I press a button a text widget appears. When it appears normally one would have to click the text widget to facilitate the running of events bound to the t...
I wrote the beautiful python example code below. Now how do I make it so when I exit then restart the program it remembers the last position of the scale?
import Tkinter
root = Tkinter.Tk()
root.sclX = Tkinter.Scale(root, from_=0, to=1500, orient='horizontal', resolution=1)
root.sclX.pack(ipadx=75)
root.resizable(False,False)
root.t...
I'm trying to add a feature in python that copies the entire contents of two text widgets. How would one go about that?
Pseudo Code:
text1.SelectAll()
C1 = text1.get(Copy)
text2.SelectAll()
C2 = text2.get(Copy)
Paste('Widget 1:\n\n' + C1 + 'Widget 2:\n\n' + C2 )
...
I need to make both a Control-Z and Shift-Control-Z function in Python. Anyone have any Idea?
Also I need to select the contents of an entire text widget, anyone know how to go about that?
...
In the code below I intend to have two buttons, and when each is pressed '0' and '1' are to be printed to stdout, respectively. However when the program is run, they both print '1', which is the last value i had in the for iteration. Why?
import Tkinter as tk
import sys
root = tk.Tk()
for i in range(0,2):
cmd = lambda: sys.stdout...
Ok, I've got the GUI in tkinter working, and I'm trying to grab and image every 5 seconds and display it in a Label named Picturelabel.
from Tkinter import *
from PIL import ImageGrab
import cStringIO, base64, time, threading
class PictureThread(threading.Thread):
def run(self):
print "test"
box = (0,0,500,500) #x,x...