15,190 Topics
![]() | |
I am new to python and Tkinter. I was trying to build an addressbook for my class. I have the Tkinter GUI looking good - nothing fancy. Now I can't get my python part working. I want to keep the GUI in its own class and file. My two files … | |
Please I need help with the following exercise: 1.Write a program that continually reads in numbers from the user and adds them together until the sum reaches 100. Write another program that reads 100 numbers from the user and prints out the sum 2. Write a function that implements Euclid's … | |
How would you write a begin procedure in python that would be analogous to the scheme expression. | |
Hi! Probably that's gonna be absolutely no0b question, but I have to ask it: Say, I have two files, program.py and GUI.py. I have to launch the GUI from the program.py file, i.e. I have to call main function of GUI.py file from within the program.py. Could someone tell me … | |
How do i take results in a mutli dim array and write it to a text file. Each sub array goes on a new line. I am a newbie at this. [code] [[2934110, 'B1', 'D4', '7C7C7C7C804040404040F140404000'], [2934110, 5, 1, 1, '01', 'Actes Sud '], [2934110, 4, 1, 2, '8C00Dubbelganger (motief)'], … | |
Hi I am trying to get the mouse position on my Canvas [code] # -*- coding: cp1250 -*- import wx class Okno: def __init__(self,parent): self.okno=wx.MDIChildFrame(parent,title=u"Náhled situace",id=-1) self.okno.Maximize() self.okno.SetAutoLayout(True) self.okno.SetBackgroundColour("#FCFCFE") self.sizer = wx.FlexGridSizer(2,2,0,0) # Add canvas self.platno = wx.ScrolledWindow(self.okno, id=wx.ID_ANY) self.platno.EnableScrolling(True, True) self.sirka = 10000 self.vyska = 10000 self.platno.SetScrollbars(20, 20, self.sirka/20, … | |
Hi, I'm puzzled by how one positions in Tkinter. Take a look at the following code: [code=Python]print "...................................Hello, world!"[/code] This works fine in the Main Idle but when it comes to Tkinter I'm confused:confused: . The game I'm working on has about 30 "clues" dotted all about the screen. About … | |
Hi All, Urgent SOS!!! I developed my project using pyton 2.5 under winXP and had an issue in loading my dll if the target user is using Win2000. Initially, I thought it was caused by the dlls I created were not compatible with Win2k. Then, I wrote a simple MFC … | |
G'day, I've worked on your code Vegaseat and have come up with the following rough sketch of how my game will look in the end: [code=Python]# using geometry manager Tkinter.Place for layouts # tested with Python24 vegaseat 28apr2007 import Tkinter as tk import random as rn #help('Tkinter.Place') root = tk.Tk() … | |
hello, I was wondering if I could recieve some help? The function I am writing is called pyramid, it consumes a number and produces stars(*) from 1 to that number. For example pyramid(5) would be: * ** *** **** ***** so far I have a function that does that backwards … | |
Hello every1, I've been googling about but can't seem to find a solution to the following problem: [code=Python] print "Hello world"[/code] How does one colourize the "Hello world" in the results. It can be any colour as long as it's not the standard blue. Also I need to know what … | |
Hello all, Need some urgent help with generating Pydoc documentation I have three .py files (a.py, b.py, c.py) on my Desktop I would like to generate the HTML Pydoc for each of these files and place the generated Pydoc onto my Desktop. I just need help running the commands from … | |
How do i put a Button indside the cell of a ListControl in wxPython. Thanks in advance. | |
Hello Folks. This is Satish and my first post on DaniWeb. :) Ok. now that the formalities are over, lets get to business.:cool: I am writing a custom image viewer for Blender using Python+OpengGL. This script runs inside blender window. You can find the status of my project at the … | |
Hello, well i have written some code to try and simulate rolling a dice.. my program has to be able to play craps... here is how it should be played.. In a nutshell craps is played with two regular dice. You win a round of craps if your first roll … | |
I need help with a program I am making it creates window but doesn't display buttons aor text controls [code=python] import wx import MySQLdb db = MySQLdb.connect(host="localhost", user="root", passwd="Hornets71", db="soul_society") cursor = db.cursor() class MainWin(wx.Frame): def reg(): number = self.numtxtctrl.GetLineText() name = self.nametxtctrl.GetLineText() uid = self.uidtxtctrl.GetLineText() cursor.execute("INSERT INTO member_list (number, … | |
All, New to python programming so bare with me but I haven't quite seen an easy way to do this and looking for some suggestions. I want to be able to replace some contents of an [B]exisiting[/B] file either by both inserting new statements or modifying/replacing new ones withiout touching … | |
G'day, First of all a very big thank you to both Jeff and Vegaseat for their great help...but sadly :icon_sad: it's not what I needed. Being a novice at Tkinter I did not realize what Tkinter was and was not capable of and I therefore blame myself :icon_redface: for any … | |
ok so i got the last part finished and working now for the bit i havent done before at all. instead of the pickle file the customer data has to be read in from a data base i have been supplied with the data base and the code but i … | |
ok you will probably be sick of my posts but i have tryed and got this far, i ripped the program to pieces and started again. basically its a atm program that i have to do for college. if anyone can see why its not workin properly it would be … | |
Hi, it's me again and i have new question: This is my code: [CODE]# -*- coding: cp1250 -*- import string as _string import time as _time import wx from math import* class Canvas: def __init__(self,parent): self.okno=parent self.okno.SetBackgroundColour("#FCFCFE") self.radic = wx.FlexGridSizer(2,2,0,0) self.canvas = wx.ScrolledWindow(self.okno, -1) self.canvas.EnableScrolling(True, True) self.P_WIDTH = 1000 self.P_HEIGHT … | |
So it's like this: I want to create an 'activebutton' widget with the following properties. * The button itself is text that changes foreground color when the mouse hovers over it. * If the mouse hovers for more than 200ms, a PopupMenu appears that allows the user to select a … | |
import httplib conn = httplib.HTTPConnection("<A href="http://www.python.org",80">http://www.python.org",80) conn.request("GET", "/index.php") r1 = conn.getresponse() print r1.status, r1.reason conn.close() where I test it,it show errors as below: Traceback (most recent call last): File "E:\Program\demo\src\testhttp.py", line 6, in <module> conn.request("GET", "/index.php") File "C:\Python25\Lib\httplib.py", line 862, in request self._send_request(method, url, body, headers) File "C:\Python25\Lib\httplib.py", line 885, … | |
I am trying to run a Cherrypy tutorial from this site: [url]http://www.serpia.org/cherrypy[/url] It is giving me this error when I try to run the start.py: [code] bob-smiths-powerbook-g4-15:~/Desktop/CherryPyTutorial/cgi-bin bobsmith$ python start.py Traceback (most recent call last): File "start.py", line 21, in ? cherrypy.server.start() File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/cherrypy/_cpserver.py", line 92, in start raise ValueError("No … | |
hi ppl i m a biologist by profession and wish to learn python , may i request for any online free book or guide ! thankx in advance with regards | |
Hi I am solving new problem and i cant find any solutin:( i have wx.PaintDC and i painted there some lines. I am trying to save it as file. I found only something about BufferedDC, but it didnt work corectly:( Thanks for all post! | |
I wanted to do an image viewer for a photo catalog project. Here is the code: [php] import Image, ImageTk from Tkinter import * filename = "C:/Pictures/2006/2006.07.04/E clarus 1 crop.jpg" class MyFrame(Frame): def __init__(self, master): Frame.__init__(self, master) im = Image.open(filename) # <--- chokes! im.resize(250,150) self.image = Label(self, image=ImageTk.PhotoImage(im)) self.image.grid() self.grid() … | |
So, it would be nice to be able to insert scrollbars into my program (with Tkinter). Right now I'm using labels to display all my long blocks of text, and people flip through pages to get throught it all. I thought I'd try to add a scrollbar, but it doesn't … | |
So I'm at the final stages of my program -- it's a working experiment that creates a data file for each participant. My hope was that when I was done, it would be relatively easy to create an analysis program that searches through all the data files and create a … | |
ok you will probably be sick of my posts but i have tryed and got this far, i ripped the program to pieces and started again. basically its a atm program that i have to do for college. if anyone can see why its not workin properly it would be … |
The End.