15,175 Topics
| |
Hi, Python v2.7 Tkinter Windows 7 I am having some troubles drawing a line. I have called create_line inside a for loop, in which I gave it coordinates that are returned from another function. However, instead of drawing separate lines, it joins the lines together. Here is a snippet of … | |
Hey everyone, Yesterday I wrote a simple Hello World program and saved it as .py. However, when I tried to run the .py file it didn't have a default program. So, I went to 'Choose Default Program', found 'python.exe' and clicked it. 'python.exe' did not show up in the 'Choose … | |
I just started a new small python project on google code which goal is to easily create clickable graphs on a GKT+ goocanvas. The initial idea comes from this code snippet [url]http://www.daniweb.com/software-development/python/code/323792[/url] . I want to do about the same, but instead of simply drawing the graph, I want to … | |
Hello everyone, I am a student at ITT-Tech studying computer network systems and system security. I am programming now for programming class, but it is very addictive and I really enjoy it. in my spare time I enjoy survival training, time with my kids, reading, and traveling. | |
[CODE] import Tkinter as tk import Image, time, datetime def splash_screen(): root = tk.Tk() root.overrideredirect(True) width = root.winfo_screenwidth() height = root.winfo_screenheight() root.geometry('%dx%d+%d+%d' % (width*0.8, height*0.8, width*0.1, height*0.1)) image_file = "NHK.gif" image = tk.PhotoImage(file=image_file) canvas = tk.Canvas(root, height=height*0.8, width=width*0.8, bg="black") canvas.create_image(width*0.8/2, height*0.8/2, image=image) canvas.pack() root.after(10000, root.destroy) root.mainloop() return splash_screen() my_menu()# is … | |
Hey every one, the code above below a user to draw lines and create circles that will collide with the lines and have them roll down the lines. The problem im having is geting the screen to follow the circles. Also im having a problem having the user be able … | |
Here is function to count the number of elementary events for sum of multiple throws of n-faced dice. | |
We are developing application in python web development (No frameworks like Django) using just cgi module. In thing we have to use session management to transfer the variables between pages. I tried in google but no useful matter I found, if you know which module is to manage the variables … | |
I have a file with the following path :[code] D:/bar/クレイジー・ヒッツ!/foo.abc[/code] I am parsing the path from a XML file and storing it in a variable called "path" in the form of "file://localhost/D:/bar/クレイジー・ヒッツ!/foo.abc" Then, the following operations are being done : [code] path=path[17:] #to remove the file://localhost/ part from the path … | |
You need the Python tkSnack module to play notes of a given frequency and duration on your external sound system (attached to the PC's sound card). The code snippet gives just a tiny hint about the capabilities of tkSnack. It works with Tkinter, normally part of the Python installation. The … | |
Can somebody please help me with coding a program for online graph plotting using 'python flask'. The program has to take as input a .csv file and manipulate it and plot it accordingly. | |
Tuples are immutable objects, they cannot be changed says the Python manual. [code]my_tuple = (1, 2, 3, [4, 5, 6]) # this works my_tuple[3][2] = 7 # clearly the item at index 3 in the tuple has changed print(my_tuple) # (1, 2, 3, [4, 5, 7]) [/code] | |
I was planning to create a programme to try and locate text from an image I kknow that this is a complex issue but any assistance will be kindly appreciated,the programme should locate text and create a document containing the text found thanks. | |
I am not trying to use a setup.py, i just want to use the basic script. the website says as an example: [code] cxfreeze hello.py --target-dir dist[/code] thanks in advance! I tried this but it did not seem to work: (The Command Line is in the folder with the Shooter.py) … | |
I can access the parameters if the form submitted or hidden from the following snippet. form = cgi.FieldStorage() But I can't access the variables from URL. EX:- .../daniex.py?TYPE=R1 How can I get "TYPE" variable's value from python web lib? | |
I have this code: [CODE]import csv tally=0 i=0 n=1 numb=2 count = sum(1 for row in csv.reader( open('cities.csv') ) ) cityname = csv.reader(open("cities.csv", "rb")) citynames = [] citynames.extend(cityname) for data in citynames: citynames.append(data[0]) tally+=1 if tally>=count: break tally=0 cities_x = csv.reader(open("cities.csv", "rb")) cities_list_x = [] cities_list_x.extend(cities_x) names = [] for … | |
Hello, can anyone help me regarding how this can be done? I need to declare an 'array' which has 95 indices, and each entry holds 8 bits each of data. am doing this with: PORT_MAP_LEN = 764/8 bit_map_len = [0]*PORT_MAP_LEN but it is giving me list index out of range … | |
Greetings, I'm using PyQt4 and trying to add a QGraphicsItem exactly in the center of the current screen, by clicking a menu button. So each click will add an item in the center of my screen. My QGraphicsScene is very large (10k X 10K), so the QGraphicsView cannot show it … | |
I have the following txt file that has 4 fields that are tab separated: the first is the id and the other three show the results per test. 152 TEST1 valid TEST3 good TEST2 bad 158 TEST2 bad TEST1 bad TEST4 valid . . . Based on the above txt … | |
Hi all, I have been doing for fun this problem in projecteuler.net. The problem is as follows: +++++++++++++++++++++++++++++++++++++++++ Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4. Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6. Peter and … | |
Hi, I use [B]pulp[/B] module to solve my some optimization problems. With integer numbers, it works like a charm. I wonder if it is possible for pulp to work with real numbers. Here is a sample optimization problem I build for my project. [CODE] prob = pulp.LpProblem("example", pulp.LpMinimize) # Variable … | |
I do Get errors with combo box selections. here is my combo selection attach to a button. [CODE] def Btn9(self, event): # wxGlade: Appli.<event_handler> if self.combo_box_4.GetValue()=="1": numglobals.frame_12.Show() elif self.combo_box_4.GetValue()=="2": numglobals.frame_13.Show() elif self.combo_box_4.GetValue()=="3": numglobals.frame_14.Show() elif self.combo_box_4.GetValue()=="4": numglobals.frame_15.Show() elif self.combo_box_4.GetValue()=="5": numglobals.frame_16.Show() elif self.combo_box_4.GetValue()=="6": numglobals.frame_17.Show() elif self.combo_box_4.GetValue()=="7": numglobals.frame_18.Show() elif self.combo_box_4.GetValue()=="8": numglobals.frame_19.Show() elif self.combo_box_4.GetValue()=="9": … | |
Hi, I have a list of lists such as : [[foo,1],[baz,1],[foo,0],[bar,3],[foo,1],[bar,2],[baz,2]]. I want to get all the different items in the inner lists and find the total number of them. I mean the result should be like : [[foo,2],[bar,5],[baz,3]]. How can I do this task? Thanks in advance. | |
I need to make an interactive program in Python that will start by asking the user to enter a list of numbers and then it will display the following menu. 1-Find The Maximum 2-Find The Minimum 3-Find The Average 4-Exit Please Enter Your selection Your program will accept a number … | |
hi all, i have loaded a dll with ctypes.cdll and i want to get thta dll's parameters and method like when you write: <'the dll handle'>. and just after you put the dot a list appears to show you the methods or like when you get a dir() from a … | |
Hi All, Its long have not been here. Python have been a language that have refused to get off my shoulders. After more than a year or two I'm back. And to cut story shot is, though I love Rhythmbox, It have the poorest Podcasting module I have ever encountered. … | |
This code determines if datetime object represent first workday of month, but it does not consider the special days like New Year (this year weekend but last year Friday). Reaction to Basic efforts in: [url]http://www.daniweb.com/software-development/legacy-and-other-languages/threads/362098[/url] There algorithm idea given by [URL="http://www.daniweb.com/members/jonkiparsky/775324"]jon.kiparsky[/URL] based docstring says 'workday' when it should be 'weekday': … | |
Some details of my machine and installed packages before proceeding further: [B]Mac OSX version: 10.6.6 Python version: Activestate Python 2.7.1 wxpython version: wxpython 2.8 (uses Carbon API hence limited to 32-bit mode arch only) [/B] I installed wxPython2.8-osx-unicode-py2.7 from wxpython website using their .dmg installer file. This package uses the … | |
help me face recognize using eigenfaces with opencv, a person in webcam | |
I was exploring random art and modified this nice example from vegaseat: [code]# random circles in Tkinter # a left mouse double click will idle action for 5 seconds # modified vegaseat's code from: # http://www.daniweb.com/software-development/python/code/216626 import random as rn import time try: # Python2 import Tkinter as tk except … |
The End.