15,181 Topics

Member Avatar for
Member Avatar for imperialguy

I want to create an ultimate list ctrl based table where the user can sort the columns by clicking on the column header. Here's the code I attempted: [CODE]import wx import wx.lib.mixins.listctrl as listmix from wx.lib.agw import ultimatelistctrl as ULC APPNAME='Sortable Ultimate List Ctrl' APPVERSION='1.0' MAIN_WIDTH=300 MAIN_HEIGHT=300 musicdata = { …

Member Avatar for woooee
0
484
Member Avatar for algrandjean1

I am having a little trouble ending my program when I click on my End Program button. The current code that I have keeps making the program freeze when I try to exiting via the button. Also, I am having some issues with my Auto Button not working. Any help …

Member Avatar for woooee
0
171
Member Avatar for peste19

I made a function which will look up ages in dictionary and give out there name my dictionary si for example {george:16,amber:19} i made this [CODE] search_age = raw_input("Provide age") for age in list.values(): if age == search_age: name = list[age] print name[/CODE] but i know how to compare and …

Member Avatar for woooee
0
97
Member Avatar for huntaz556

I know this thread has been done alot but i cant find anything that i think i would like to do i want to make a program in python i have a pretty basic understanding of python and i really like it but i want to make somthing thats going …

Member Avatar for huntaz556
0
343
Member Avatar for Creatinas

Hello, i need some help with code, i need to be able to print something that function returns then i press button on panel1 it should return text to panel2 textctrl in wxpython. Here is some bit of code.(i just cut code that i think is needed for this) [CODE] …

Member Avatar for Creatinas
0
154
Member Avatar for eikonal

Hi guys! Pretty easy question below From the code below 'data' is made by a column of numbers, let's say 12 numbers (see below) 56.71739 56.67950 56.65762 56.63320 56.61648 56.60323 56.63215 56.74365 56.98378 57.34681 57.78903 58.27959 [CODE]def block_generator(): with open ('test', 'r') as lines: data = lines.readlines ()[5::] for line …

Member Avatar for eikonal
0
180
Member Avatar for cdedmundson

I am working on a python version of the game Lingo. Here are the rules: [I]"Suppose the secret word is bones. Suppose you guess the word books. The computer will mark your guess as [b][o](o)k[s], where [b], [o], and [s] are letters that are in the correct position in the …

Member Avatar for joehms22
0
364
Member Avatar for sofia85

Hi, I'm trying to add new information, with several if loops, to a new file with append.() but I'm not sure that this works. The new file will also include some data from the f_file, that is why the if loops are there. [CODE]f=open('filename', 'r') new=open('filename', 'w') for data in …

Member Avatar for sofia85
0
103
Member Avatar for sathyapro

HI This is sathya seelan.. I want to develop a simple web application using python... it has to be like a mail interface msgs needed to be stored and login details should be stored in database pls help me with a code snippet

Member Avatar for Tech B
0
175
Member Avatar for wonjun, choi

I want to draw like this [url]http://ompldr.org/vYjN1ZQ[/url] by using the example : [url]http://code.activestate.com/recipes/410158-fractal-tree/[/url] or anything the algorithm is [code] def Calculator(Total): numpyArray = numpy.zeros((Total, 2)) for i in range(1, Total+1): #if i == Total+1 or i == 1: numpyArray[i-1, 0] = ((2 * i) - 1) numpyArray[i-1, 1] = (Total …

0
47
Member Avatar for martyshka

I need to create this game in Python but I'm really confused on how to write the code! The game Accordion is played with a deck of 52 cards. Beginning with one card, cards are laid out in a row to the right. As each card is played, its compared …

0
57
Member Avatar for Sprewell184

Hey, I am confused how to display an image in the same window. This is my code for removing a certain color(removing green) from a picture, saving it and then it displays into a different window. [B][U]I need it in same window and to be below the original image.[/U][/B] any …

Member Avatar for TrustyTony
0
111
Member Avatar for Lzaochi

I need to do a for loop that helps me rotate an image. Design a function that uses nested for loops to rotate an image 90 degrees clockwise. Could you guys help me Im lost..... :-/

Member Avatar for Gribouillis
0
26
Member Avatar for bigredaltoid

I need to read in a list from a text file, put that list in a list, read in the amount of credits the students earned as an int, and than add 16 credits to the list. Here is my code so far: [CODE]myList2 = [] myList = [] myFile …

Member Avatar for bigredaltoid
0
192
Member Avatar for python-noob

I know this forum isn't to give away the answers, but could someone maybe help me get started? My biggest problem is figuring out where to start. Even the pseudo code doesn't help me very much. I don't know how to use an excel file in a program either. I …

Member Avatar for python-noob
0
205
Member Avatar for Sprewell184

I have this code below where I have to make it a function. I'm confused. I tried [CODE] def drawLine(img): .... .... .... [/CODE] Do I set the location of the picture as my variable? and then calling it? How would I call my parameter when I want to check …

Member Avatar for TrustyTony
0
121
Member Avatar for Sprewell184

Hi, I have this problem where I have to make a function that takes one parameter and draws two vertical lines, one is a red line from (50,0) to (50,300) and one made up of randomly colored pixels(150,50)to (150,250). I didn't define my function yet but for some reason my …

Member Avatar for Sprewell184
0
1K
Member Avatar for my.name

Hello everyone, :) I have exercise for class that I can't complete, I don't understand why my loops aren't working The question--- Write code that will print a multiplication table for 10 positive integers across the columns and 10 positive integers down the rows. Prompt the user for the starting …

Member Avatar for my.name
0
839
Member Avatar for praveens96

import MontyLingua theTagger = MontyLingua.MontyLingua() String = "when was tom born?" #tokenized the String tokenizedString = theTagger.tokenize(String) chunkedString=theTagger.chunk(tokenizedString) #error coming here #Tag the tokenized String tagString = theTagger.tag_tokenized(tokenizedString) print tagString #A more simple way to tag the String tagString = theTagger.jist(String) can anyubody help me why error is occuring there …

Member Avatar for sumitb128
0
623
Member Avatar for madtowneast

Hi all, I have been trying to economize some code. I am trying to nested three notebooks into each other and that looks something like this: [CODE] #!/usr/bin/env python import os import sys import datetime import numpy as np from readmonifile import MonitorFile from sortmonifile import sort import wx class …

0
95
Member Avatar for thatjoeguy01

Hey, So I am a very experienced PHP programmer and completely new to python, I was wondering if someone could assist me with this program I am trying to make, The idea is simple The program has 10 different fortune quotes, the user needs to be able to tell the …

Member Avatar for thatjoeguy01
0
181
Member Avatar for ChristianOncken

[CODE]# a very simple Tkinter editor to show file read/write dialog from tkinter import * from tkinter.filedialog import * class App(object): def __init__(self, master): frame = Frame(master) frame.pack() self.text = Text() self.text.pack() menu = Menu(master) root.config(menu=menu) # file menu filemenu = Menu(menu, tearoff=0) menu.add_cascade(label="File", menu=filemenu) filemenu.add_command(label="New") filemenu.add_command(label="Open", command=self.file_open) filemenu.add_command(label="Save", command=self.file_save) …

Member Avatar for Gribouillis
0
255
Member Avatar for king_koder

What does xrange do in python?? And how do I implement a similar function in Python3??

Member Avatar for Gribouillis
0
11K
Member Avatar for arindam31

Hi , I am trying to save the output of "help('tkinter')" in a text file. But i get error. I want to know if there is a Way to get the output of help file redirected to a file , or save in a variable. By the way , the …

Member Avatar for Gribouillis
0
386
Member Avatar for ultimatebuster

How come unittest.TestCase doesn't exist for me? [CODE] Traceback (most recent call last): File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 1, in <module> import unittest File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 4, in <module> class CheckStructureAcceptance(unittest.TestCase): AttributeError: 'module' object has no attribute 'TestCase' [/CODE]

Member Avatar for Utopia_Tz
0
5K
Member Avatar for rysin
Member Avatar for TrustyTony

This is similar to earlier posts in DaniWeb by vegaseat, but it demonstrates getkey with withdrawn tkinter, restart inside object by re-calling it's __init__ method.

Member Avatar for TrustyTony
2
2K
Member Avatar for Flames91

Hi all, I'm fairly new to python and I'm stuck with a problem. What I'm trying to do is write a recursive function that takes a list of integers and returns true if the list contains a single pair of integers whose sum is negative, and false otherwise. For example: …

Member Avatar for arson09
0
746
Member Avatar for sys73r

[CODE]from tkinter import * def handler(event): print("Clicked at", event.x, event.y) class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() for r in range(6): self.master.rowconfigure(r, weight=100) #Creating custom buttons self.master.columnconfigure(0, weight=100) Button(master, text="Red",command=self.colorit).grid(row=6,column=0,sticky=E+W) self.master.columnconfigure(1, weight=100) Button(master, text="Blue").grid(row=6,column=1,sticky=E+W) self.master.columnconfigure(2, weight=100) Button(master, text="Green").grid(row=6,column=2,sticky=E+W) self.master.columnconfigure(3, weight=100) Button(master, text="Black").grid(row=6,column=3,sticky=E+W) self.master.columnconfigure(4, weight=100) Button(master, text="Open", command=self.hanlderf).grid(row=6,column=4,sticky=E+W) Frame1 = …

Member Avatar for sys73r
0
2K
Member Avatar for mjohnson

hello I'm trying to create program to check for the user password"only numbers" if it's correct then go to the next step. if not just type Invalid password the password should be store in another file which is "password.txt" this is my code but I couldn't make the program check …

Member Avatar for mjohnson
0
1K

The End.