15,175 Topics

Member Avatar for
Member Avatar for nodnil

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 …

Member Avatar for nodnil
-1
260
Member Avatar for WolfShield

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 …

Member Avatar for WolfShield
0
184
Member Avatar for Gribouillis

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 …

Member Avatar for Gribouillis
1
166
Member Avatar for Python Joe

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.

Member Avatar for jingda
0
27
Member Avatar for Python Joe

[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 …

Member Avatar for Python Joe
0
483
Member Avatar for izthrower

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 …

Member Avatar for vegaseat
0
196
Member Avatar for TrustyTony
Member Avatar for TrustyTony
1
262
Member Avatar for kuchi

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 …

Member Avatar for kuchi
0
101
Member Avatar for vr3690

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 …

Member Avatar for vegaseat
0
227
Member Avatar for vegaseat

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 …

Member Avatar for Layra
3
5K
Member Avatar for nighthawk10

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.

Member Avatar for vegaseat
0
292
Member Avatar for Lardmeister

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]

Member Avatar for vegaseat
0
184
Member Avatar for kenkit

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.

Member Avatar for kenkit
0
86
Member Avatar for maddenfong

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) …

Member Avatar for vegaseat
0
153
Member Avatar for kuchi

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?

Member Avatar for woooee
0
71
Member Avatar for jarograv

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 …

Member Avatar for woooee
0
299
Member Avatar for novice20

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 …

Member Avatar for novice20
0
517
Member Avatar for Prahaai

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 …

Member Avatar for Prahaai
0
1K
Member Avatar for tax

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 …

Member Avatar for TrustyTony
0
163
Member Avatar for tikoti

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 …

Member Avatar for TrustyTony
0
511
Member Avatar for Shansal

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 …

Member Avatar for Gribouillis
0
286
Member Avatar for aplh_ucsc

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": …

Member Avatar for Gribouillis
-1
300
Member Avatar for Shansal

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.

Member Avatar for TrustyTony
0
171
Member Avatar for tucker001

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 …

Member Avatar for predator78
0
312
Member Avatar for s_jmp

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 …

Member Avatar for bunkus
0
521
Member Avatar for Stefano Mtangoo

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. …

Member Avatar for Stefano Mtangoo
0
260
Member Avatar for TrustyTony

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': …

Member Avatar for TrustyTony
1
4K
Member Avatar for imperialguy

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 …

Member Avatar for imperialguy
0
613
Member Avatar for hoangtuepchai
Member Avatar for HiHe
0
81
Member Avatar for HiHe

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 …

Member Avatar for HiHe
0
17K

The End.