1,133 Topics
![]() | |
Hi All i have downloaded following code from web that inputs sound samples and displays spectrum, i want to print frequencies present in each second in the spectrum.i.e when ever the spectrum is displayed i want to print those frequencies as well on the console. Below is the code i … | |
Hi, I'm a relative newb to Python and I'm starting my first major project - a logarithmic graphing system. I'm using tkinter for the GUI part of the design, but I've run into a problem. Basically, I want my graph (a tk canvas) to appear in the same (root) window … | |
Hi, I'm new to programming, and I'm trying to make a simple metronome program. I can't figure out why sound is not being played. The tk window does open, but otherwise, nothing else happens. [CODE=python] from Tkinter import * import tkSnack root = Tk() tkSnack.initializeSnack(root) testsound = tkSnack.Sound(load='/Users/nikitahaduong/Desktop/Python/metronomesound.mp3') testsound.play() root.mainloop() … | |
I am still fairly new to python, and with it being my first object oriented language, I'm taking my time with it... I have been playing with Tkinter, and creating small apps that don't really do a whole lot. Now I'm getting into larger and more complex ones. The question … | |
Using the tutorial found here: [url]http://www.daniweb.com/code/snippet216550.html[/url], I have begun the graphic portion of my game. I have many .gif battler sprites loaded into variables in my project. However, all of these battlers are right-facing. I need some of them to be flipped to be left-facing to be on the hero's … | |
How do you draw a star in Python, I am really confused over it now This is the program I have so far import helper *helper checks if input is valid or not import ecs10graphics07 as gr * ecs10graphics07 is almost the same as the program Tkinter import math starPoints … | |
I'm trying to create a Tkinter that will search through a webiste and import a picture. My codes is a bit messy but I'm able to use the Search button and grab a URL and print the URL in the Python Shell, but I'd like to show the URL image … | |
Can someone please tell me why my menubar does not show up? [CODE] #!/usr/bin/env python from Tkinter import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.master.rowconfigure(0, weight=1) self.master.columnconfigure(0, weight=1) self.master.title('Test Menu') self.createMenu(master) #self.createShell() def createMenu(self, master): menubar = Menu(master) master.config(menu=menubar) loadmenu = Menu(menubar) loadmenu.add_command(label='Load', command=self.load) loadmenu.add_command(label='Save', command=self.save) loadmenu.add_separator() loadmenu.add_command(label='Quit', … | |
Hello all, I'm in an intro to Python class and I had to pick a project to do. It involves moving a bucket to collect balls. I tried this with pygame already, might I add, and I decided to do it with just tkinter. My question is as follows. I … | |
Hello! I'm just beginning to learn Python and I would like you to recommend me any good tutorial. I have started with the [URL="http://www.pythonlearn.com/"]http://www.pythonlearn.com/[/URL] and the [URL="http://hetland.org/writing/instant-python.html"]http://hetland.org/writing/instant-python.html[/URL]. I have found them very useful and I would like to continue learning. Furthermore, I would also like to start learning on programming … | |
i have my code and i want to cycle through the following colors blue green orange red yellow. i got blue but i dont know how to the rest [CODE]from Tkinter import * myfont = ("Arial", 1, "bold") window = Tk() window.title("grid") window.geometry("500x420") frame = Frame(window) frame.grid() button0 = Button(frame, … | |
For my python class i have to make a game, i decided to make a simon sort of game. I'm not allowed to use any outside modules; for instance pygame. I have most if not all of the visuals done. But there are two main issues: - One issue is … | |
I making a game that would use multiple canvases drawing on one canvas then switching to another... is there any way to get a new canvas and be able to restore the old canvas with the drawings still on it? | |
if been using python's tkinter for awhile to write programs when I caused an issue that I'm not sure what is my code is long even after I gutted it. [CODE]from Tkinter import * import random import operator info_dict = {} info_dict["area"] = 1 info_dict["slime_spot"] = random.randint(1,36) info_dict["slime spotter"] = … | |
ok well I'm working on making a dungeon explorer and I can't get images to work...so far I have this[CODE] from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() canvas = Canvas(frame, width = 225, height = 225) canvas.pack() gif1 = PhotoImage(file = 'Fhall.gif') canvas.create_image(0, 0, … | |
I'm making a little game and I can't get button bindings to work. Here is what I have so far [CODE]def forward(event): print "up" frame.bind("<Up>",forward)[/CODE] but pressing the up arrow does nothing...is there something I missed? | |
I'm not a huge contributor on these forums, but I do read a lot. Anyhow, I have "completed" a couple things I've been working on in the last couple weeks, and thought I would share. [url]https://bitbucket.org/jgrigonis/mortgagecalculator[/url] A simple mortgage calculator written in python using tkinter that lets you calculate any … | |
I have been working on this simple text editor using Python 3 and Tkinter. This is my first time creating a program with an actual GUI and I have relied only on Tkinter documentation. I managed to create a text editor. However, we I started working on the commands of … | |
Hey guys. I'm working on a simple hangman program. I got the core engine down working in a command prompt, and now I'm making it using classes and a GUI. I'm using tkinter. Anyway, everything works with no error, but the image is not displaying at all. Here is the … | |
python.org tell people to forget about python 2 and head into python 3, but many 3rd party module do not support python 3 at all. For example, python 3 only ship with a tkinter gui module which does not have great reputation. If I am to use python 3, I … | |
Hello! (I would like to use tkinter. ) I'm going to do my program who convert roman letters to arabic numbers and vise versa. I'm going to do two buttons and a textfield where you can write in the number or letters and then choose if you want it transelate … | |
Hi all, I am trying to update the colour of a Tkinter label, so as the value of a variable changes so to does the colour of the text. Below is a simple example of what I am trying to achieve, but the problem is when I press the button … | |
I am doing the O'reilly School of Technology course and the current topic deals with Tkinter. It gave me the idea to write this application. The idea is to transfer files to various ftp sites. If I set a default master password, then the password should be used for all … | |
Hi, I've been using tkinter to write a program that has a root window and many toplevel windows. I was able to create them successfully but my next step was to incorporate mysql with it so it would actually store any data that was entered in the various entry fields. … | |
Hey all I am trying to make GUI windows using Tkinter and have got stucked. Its exactly like an installation setup where you move to new windows . I have been unable to understand how to create multiple application windows in Tkinter. I want that according to user input I … | |
I wrote a little program a while back that changes windows a lot and I was wondering if there is a way to have one window open at the same spot the last window closed? | |
Hello, i search widzet for Tkrinter how creat new window ( not Toplevel() ), i want use in this box html thanks ( sorry, my EN is so bad .. ) | |
I'm trying to build a Tkinter that counts how many times a letter appears in the entry box. I want it so I enter letters A,B, or C into the entry box, and when I click 'Count' it displays how many times each letter appears. I feel like I'm really … | |
from Tkinter import * import sys Root=Tk() RTitle=Root.title("Windows") RWidth=Root.winfo_screenwidth() RHeight=Root.winfo_screenheight() Root.geometry("%dx%d")%(RWidth,RHeight)) mainloop() Hello. When I run this code the window takes up the entire screen(win7).but remains below the bottom of the window portion of the taskbar. Even if the screen size is changed automatically carry out this.According to the height … | |
Hello everyone, I was wondering, if I wanted to make my code a little smaller in one file, is it possible for me to import another file I made? E.G. (Very simple e.g. just for helping understand what I mean) Let's say I made a program that the user types … | |
Hi Folks, I'm a noob but I'm slowly getting addicted to python. I've been hitting a wall for about 4 hours trying various things to no avail. It looks to me like it should work and runs without error but.... I expect the blockcount counter to be high (but it's … | |
I have a class with a button, it runs the command automatically when the gui is constructed (which i dont want it to do) but then doesnt work again after. What am I doing wrong? Builtin commands such as endcommand work as they should. relevant excerpts (ignore the indent problem … | |
I've been doing programming in tkinter for awhile now and I came across a problem...this problem only shows up after a single part but here is the code...kinda lengthy.if you go to the equip menu and equip bare neck you can't change necklaces again. any help in shortening this or … | |
Hello, Now I'm making a program for creating language glossaries, but the problem is that windows uses ANSI for encoding text files, and the program that will read these files (which is not mine) only displays words in utf-8 encoding. Since my program is multiplatform, it can also work under … | |
Hi All, My name is Nick Buchholz, I work for the National Optical Astronomy Observatory as a software engineer. Most of my work involves the code used to control the detectors that take our data and getting that data to a disk or data handling system. I until the last … | |
Hi! Re: [url]http://www.daniweb.com/forums/post868247.html#post868247[/url], the example provided by sneekula is helpful, but I need to return the result of the ButtonRelease-1 to main; the only way I could figure out to do this was using a global; is there a better way? Thanks again! | |
#hi friends #when I try to press Control-a the characters in the text box are not selected # I want help but I dont know class type programming. My codes are below. [CODE] from Tkinter import * root = Tk() def tcopy(event): mytextbox.clipboard_clear() mytextbox = text.get("sel.first", "sel.last") mytextbox.clipboard_append(Textkut) def tcut(event): … | |
#hi friends #when I try to press Control-a the characters in the text box are not selected # I want help but I dont know class type programming. My codes are below. [CODE] from Tkinter import * root = Tk() def tcopy(event): mytextbox.clipboard_clear() mytextbox = text.get("sel.first", "sel.last") mytextbox.clipboard_append(Textkut) def tcut(event): … | |
I am having trouble with tkinter and python on my Mac, I'm running Leopard.I did a port install of python2.6, numpy, scipy, matplotlib, but when I try and import matplotlib.pyplot, I get the following error. I think there is a conflict with the pre-built version of python that comes with … | |
Here's a weird one: I have a Tkinter.Text widget that I import data from with inputText.get(1.0,END) However, later in the program I have the text in an array, but the array has values like: 'u\x00s\x00e\x00r\x00' Is there a way to decode this weird string to a normal string? I think … | |
Hi, I have a UI built in Tkinter. The user can type in some inputs and hit "Run" When the "Run" occurs, a program executes that could take 30 seconds or more! The problem is that this blocks the graphics updating. At the beginning, I set a Label to "Running … | |
I'm trying to program Tic-tac-toe. When I run my program, the X's and O's pop up in all sorts of strange locations, and they don't "settle" into their proper positions until the very last move of the game. Here is my code: [code]'''Tic-tac-toe. ''' from Tkinter import * SQU_SIZE = … | |
How do I a add a copy and paste function in a Tkinter text widget? | |
Hi, I just finished a Python UI app with Tkinter and want to make it runnable by double-clicking an application on Mac OS X. But I'm having trouble figuring out how to do it. Does anyone have any instructions they could point me to? Thanks! | |
Hi, Im trying to create a canvas as a background but i can manage to work =/ I create a window with the text and the size of de image, but the image is not there can someone help me? thanks. [CODE]import Tkinter as tk import tkMessageBox class Janela: def … | |
I want to create a jpg image containg some graphics which I draw using the Tkinter Canvas widget. This draws the image to screen and then I use the PIL library ImageGrab() function to grab it off the screen into a file. It would be much neater to by-pass drawing … | |
I have this program I'm trying to write, a simple application with gui: a menu and a button. Whenever I go to run it, this is the error I get: Traceback (most recent call last): File "/Users/[I]myname[/I]/Documents/School/Programming/Window.py", line 27, in <module> app = Application() File "/Users/[I]myname[/I]/Documents/School/Programming/Window.py", line 14, in __init__ … | |
Hi! I am using a label widget in order to display a n rows and m columns matrix. My program allows repeated generation of a random matrix of integer (of arbitrarily number of rows and columns) - I am observing these matrices by representing them in a Label type widget. … | |
I used py2exe to make an executable,works fine.But even for a simple app I've got 18 other files(.pyd and dlls includinf pythonxy.dll) in the dist folder. I've heard that these files can be compressed into the executable using Gui2exe. I have Gui2exe installed already but haven't quite used it due … | |
If you bind a Tkinter widget to an event, normally only the event information is passed to the function responding to the specific event like a mouse click. Python allows you to expand the event handler to include any number of values to be passed on. Here is a typical … |
The End.