1,133 Topics
![]() | |
Just wondering how the game would be put together, maybe even a step by step tutorial. I could use this to practice with the commands used without Tkinter or Pygame. This could be a good learning experience. | |
I am currently trying to load a few script through boost python. I ran into some trouble today while trying to launch idle from it however and I cannot figure out the cause of the issue. This is on a windows 2008 machine, and I am currently running Python 3.3 … | |
Just a simple text editor using the Tkinter expansion TIX. You are encouraged to improve this program with added functions. TIX is included with the latest Python distributions. | |
Hi I am trying to get a tkinter UI to allow me to do two things. * When I right click in a Treeview widget and my mouse pointer is over an item I would like the item to be selected as if the user clicked on it * When … | |
Hi I am struggling with the Tkinter (ttk) Treeview. I want to allow the user to select multiple items in the Treeview using Shift and clicking. However I then want to be able to right click on the selection, or drag the selection using the normal left mouse button (B1). … | |
Hi I am busy building a small Python app in which I have two tkinter (ttk) Treeview widgets. I want to be able to drag an item (or multiple selected items) from the one treeview to the other, having the dragged items added to the treeview where they are dropped. … | |
Hi All, I am trying to run a second script from my first script and this works ok i can send it a variable and recieve back my answer however I am using Tkinter for my forms but when i start the main my program both scripts run although i … | |
I am new to python but have experience with Java. I am creating a bouncing ball program which throuhg a for loop creates a large sum of bouncing balls. I appreciate any help! Thank you import time from random import randint x0 = 10.0 y0 = 10.0 ball_diameter = 15 … | |
I am converting a program in python that is written and used on another OS that starts with the letter w. The script as written works on that OS, but on Linux it seems to fall flat on its face. First, I do not have access to any non Linux … | |
I've been working on Tkinter, and setting a message box. It worked fine, but I didn't really like the fact that the text displayed was in a small position in the window. Take a look at this code and you'll know what I mean. def About(self): text = Message(self, text=''' … | |
from socket import * from time import time, ctime import thread import Queue import os class ThreadSafeConsole(Text): def __init__(self, master, **options): Text.__init__(self, master, **options) self.queue = Queue.Queue() self.update_me() def write(self, line): self.queue.put(line) def clear(self): self.queue.put(None) def update_me(self): try: while 1: line = self.queue.get_nowait() if line is None: self.delete(1.0, END) else: … | |
I apologise in advance but I have resorted to posting all of my code as I'm really struggling on this! I have created a table which is initially empty then a user imports a text file and creates 'n' rows depending on the content. Each row has an option menu … | |
I'm trying to implement image processing s/w that requires me to implement an image enhancement module that performs various operations like Color, Contrast, Brightness, Sharpness manipulation on the same image. I've implemented a module but it works on the same (original) image and changes done are not reflected. Please help. … | |
Below is en2.py code- # The Python Imaging Library # $Id$ # this demo script creates four windows containing an image and a slider. # drag the slider to modify the image. # from Tkinter import * from PIL import Image, ImageTk, ImageEnhance import sys # enhancer widget class Enhance(Frame): … | |
I want to print the histogram of an image in the same window. The given code works fine with viewing the histogram through Windows Image Viewer(default program) but fails to print the required histogram and image in a frame. # RGB Hitogram # This script will create a histogram image … | |
I'm building an image processing appilcation..the problem is I'm not able to import separate scripts in my main script..I want to use them for various functions..but it shows an error.. can anyone tell me the correct procedure to import script defined for various functions.. ` from Tkinter import * from … | |
I have the following code where I have several small problems. I have included some comments as I can't seem to get my 'pop up menu' button to work in order to retrieve the number of columns requested by the user. I then need to be able to get the … | |
Hello everybody, I'm trying to improve an application i found at this link [Click Here](http://www.alcrypto.co.uk/satmap/tkinter-video.py) which can load and play a video file .avi or .ogg. My problem is as follows: I'm unable to load another video file though i have access to the dialog box. In addition to that, … | |
hi, i made a music player it opens almost all the songs but while opening some songs it gives this error : A:/Chrome Downloads/Jhalla_Wallah_(Remix)_-_(MusicTub.Com).mp3 Error 277 for "open "A:Chrome DownloadsJhalla_Wallah_(Remix)_-_(MusicTub.Com).mp3" alias mp3_0.878022650438": A problem occurred in initializing MCI. Error 263 for "set mp3_0.878022650438 time format milliseconds": The specified device is … | |
I googled little around for correct way to not reinventing of the wheel for expression evaluation (even I had done some simple evaluation check for my [Tkinter calculator snippet](http://www.daniweb.com/software-development/python/code/282548/simple-calculator) earlier). After getting totally upset with [this example](http://www.bestcode.com/html/evaluate_math_expressions_pyth.html), I made this with some struggles with `__builtins__` globals parameter of eval. First … | |
Hello, I need your help with something (again): I need to control two text widgets with one scrollbar and, thanks to this website, I found some code to do it using listboxes (here: [url]http://www.daniweb.com/forums/post940371.html#post940371[/url]). I modified it, and it now works with text widgets and pyton 2.x. The problem is: … | |
Hi, this is, let's say, the second part of this thread: [url]http://www.daniweb.com/forums/thread291657.html[/url] I have managed to control two widgets with one scrollbar, but now I have realized that, althought the widgets can be controlled individually via the mouse wheel or the keyboard, I sometimes need individual controls for each widget. … | |
Hello! I am new to Python, and I want to learn it. I have just installed Python 2.7.3 And Visual Python Tkinter IDE for Ver 2.6-2.7-3.1 (BETA) –Version: 2.0.12.2524. I was looking into some the Tutorial and follow the first example to code. Here begun my issues. First Step: I … | |
i made a music player with a playlist but the songs in playlist are not playable because only the name of song is going in playlist not a complete mp3 file. can you tell me how to handle this problem?? here is my code from Tkinter import * import mp3play … | |
![]() | Hello. I recently finished my 1. semester in Computer Science, and got a good fundamental idea on programming in Python. Our exam assignment whas to create a game where we had to smash robots by clicking around with the mouse. The GUI was provided by our instructor. Now we newer … |
I have a script where text is inserted into a scrolledText widget, using Pmw megawidgets. A tag is assigned to the text, and when you click on it, the text is hidden, that is, it changes color to the background color. To unhide it you click it again. What I … | |
Hi I am trying my hand at GUI using Python and Tkinter. I know there are probably better options out there but I only have access to Tkinter here at work. My question is this. I have written this: #!/usr/local/bin/python2.6 from Tkinter import * import os root = Tk() root.title("EIMA … | |
%author: Alexis Papathanassopoulos from Tkinter import * import Image, ImageTk import os import glob import time top = Tk() c=Canvas(top,width=800,height=400, bg='lightblue') c.grid(row=0,columnspan=2,sticky=N+E+W+S) pdict={} class Flow: def __init__(self, clickfunc): self.cfunc = clickfunc def goto(self, canvas, nr): global velocity,autorotate clickeditem = canvas.find_withtag("pic_" + str(nr)) tagsofitem= canvas.gettags(clickeditem) oldcenteritem= canvas.find_withtag('center') if clickeditem: if oldcenteritem: … | |
So i've found this HTTP downloader in python, and I wanted to modify it. I've been trying to add a ttk progressbar, to no avail, but I have no idea why it isn't working! Here is my code: import urllib2 import Tkinter import ttk url = 'http://kharg.czystybeton.pl/pendulum%20-%20%5B2005%5D%20hold%20your%20colour/05.%20through%20the%20loop.mp3' file_name = url.split('/')[-1] … | |
In Tkinter, I am trying to make the askdirectory menu more user friendly. Is there a way to center the focus of the window on the last folder opened, both vertically and horizontally? I don't want my users to have to scroll right when they get deep into subfolders. def … | |
We can run Python2 script in most simple cases if we just use the 2to3.py script found in recent Python versions: F:\Python27\Tools\Scripts>copy \test\output_window_tk.py \test\output_window_tk2.py 1 tiedosto(a) on kopioitu. F:\Python27\Tools\Scripts>2to3.py -w \test\output_window_tk.py RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: … | |
So I'm trying to create a simple game, and right now the interface for the game requires a grid of buttons to be created based on a number required by the user. Currently I have a scale widget which a allows a user to choose a grid size, and a … | |
hi, i am a complete newbie on software development onlt a couple of weeks, currently working through a manual and one of the chapter challenges is to create a number guess game in a GUI enviroment. been trying to look for tips on the web to no avail. i am … | |
Hi, I am making a music player in python 2.6 with Tkinter. Here's my code : from Tkinter import * import mp3play import tkFileDialog import Tkinter def open_file(): #Opens a dialog box to open .mp3 file global music #then sends filename to file_name_label. global mp3 global play_list filename.set (tkFileDialog.askopenfilename(defaultextension = … | |
[CODE]def scoreScreen(): #Keeps Calling score = 999999/canvas.data.timer canvas.create_rectangle(0,0,1000,460, fill = "black") canvas.create_text(500,200, text = "Your Score was", font = ("Comic Sans MS Bold", 20, "bold"), fill = "Red") canvas.create_text(670,200, text = str(score), font = ("Comic Sans MS Bold", 20, "bold"), fill = "Red") canvas.create_text(500,400, text = "You have beat the … | |
I have been working on this for a while. I'm new to python programming. I've been designing a user interface. I origionally created a python file for each interface. Such as the two below. mainmenu.py from Tkinter import * class mainMenu: def __init__(self, master): frame = Frame(master, width=500, height=400, bd=1) … | |
Hi to all, i'm writing a little interface in python with Tkinter on linux debian, with this interface i need to execute some program like rdesktop and vnc. but i've a little problem: i use a fullscreen window without decorator (read buttons for iconify and close) where i've putted some … | |
Hello I am new to Dani web but here it goes. I am trying to create a game that called Three button monte i am using graphics from zelle but and i will upload the proper code to go alone with mine. My problem is when it comes to checking … | |
can anyone explain tkinter in object oriented style where you would have it in a class ? | |
Hi! I'm working on program with a lot of buttons and I would like to use For loop to make all of them instead of writing every each one of them. so, can anybody help me? here is example of code [CODE] import tkinter as tk def klik_1(): button1.config(image=s1) def … | |
i got a working highlight code example that works in python 2.7.2 [CODE] import Tkinter """ Edit a file and save the text. """ textFont1 = ("Courier New", 16, "normal") class ScrollbarX(Tkinter.Scrollbar): def set(self, low, high): if float(low) <= 0.0 and float(high) >= 1.0: self.grid_remove() else: self.grid() Tkinter.Scrollbar.set(self, low, high) … | |
Hi, I have several tkinter entries created within a loop, where users input numbers. I wish to create a reset button to set all entries to zero. On the following code the reset button will just reset the last entry. How is possible to call each of the entry and … | |
Hi guys, converting .ui to .py to .exe using Qt Designer (PyQt4), Python 2.7, and py2exe Ive been able to do this with Tkinter gui's but having problems with gui's from Qt Designer? First error was due to missing msvcp90.dll which ive downloaded and copied into the python dll directory, … | |
how would you go about highlighting text in the tkinter text widget ? | |
I have never used Python before, and unfortunately, this makes me completely ignorant. For this I apologise. I have a Dell Dell Latitude D430 laptop running Mint Katya I am attempting to start up a python script which is used to program 4 servos. I have python 2.7.1-0 as supplied … | |
Hi :) Can anyone help me? I want to display image in my GUI using tkinter (python 3.2.2) Do i need to download this python image library ==> PIL-1.1.7.win32-py3.2 or actually it was already in tkinter? How about the code? Thanks for the help. | |
I'm trying to use the exec command in python to try to get a function to call on different dictionaries and functions as needs change without making my program bigger than it needs to be. Unfortunately I keep getting this error: File "Game Files\Intro.py", line 214, in Anim exec compile('%slegs … | |
Hello, I am learning python and am having trouble getting this program to work correctly. [CODE]from Tkinter import* import time import tkMessageBox import random def Questions(): number1 = random.randrange(1,25,1) number2 = random.randrange(1,50,2) answer = number1 + number2 prompt = ("Add " + str(number1) + " and " + str(number2)) label1 … | |
I started making a simple drawing program, to use for a level maker, and I came across a slight issue [CODE]from Tkinter import * class Main: def __init__(self,root): w,h = root.winfo_screenwidth(), root.winfo_screenheight() current = {} canvas = Canvas(root, width = w, height = h, bd=0) canvas.pack() root.overrideredirect(1) root.geometry("%dx%d+0+0" % (w, … | |
(I'm new to programming in general) I created a program in python without an interface and part of it used a raw_input to get a users answer and compare with a stored answer. This was in a loop that limited the number of attempts the user could have. This worked … |
The End.