15,181 Topics

Member Avatar for
Member Avatar for apsu

Hi, I have a problem with a sequence. The sequence is a number range from 1 to 100. I need to show each number and also the running total of each number. for example First number in sequence is 1, running total 1. Next number in sequence is 2, running …

Member Avatar for apsu
0
106
Member Avatar for MaxVK

Hi there. I'm writing a program that uses a tree control as a form of navigation, and the structure of the tree is set up in code as the program loads. This is fine for now, but there is the possibility that the structure will need to expand considerably, which …

Member Avatar for MaxVK
0
1K
Member Avatar for hydrobat

Greetings. I'm a python noob and I'm stuck with some coding. Say you have a list with a number of elements, some of which are the same. For instance: mylist = ['blue', 'red', 'green', 'green', 'red', 'red'] Is there a way to return how many times each string occurs in …

Member Avatar for hydrobat
0
114
Member Avatar for Stefano Mtangoo

Hi All, For long now have tried to get Python bindings and none is there. jlgm suggested me to try ctypes and I dived in. But there are few examples on using ctypes for new bees like me. I tried to take lame_enc.dll (The file made me to learn ctypes …

Member Avatar for Stefano Mtangoo
0
872
Member Avatar for Stefano Mtangoo

Hello All, can someone tell me exactly what is done by this function? Thanks alot!

Member Avatar for Stefano Mtangoo
0
2K
Member Avatar for dseto200

How do I get python to pick a random word? Do I have to link it with a dictionary? If so how do you do that. Exercise from Python Programming for the absolute beginner Create a game where computer picks a random word and player has to guess the word. …

Member Avatar for woooee
0
2K
Member Avatar for Fractilion

There's two different things I'm trying to figure out how to do with Python. First, when I want my program to go through a function, which then moves on to another function..... so say I start with main(). I have variables A and B. I go on to function Do_This(), …

Member Avatar for bvdet
0
106
Member Avatar for MaxVK

Hi. I have an HTML Control on my frame and I am able to display pages in it: [CODE] self.krtc = html.HtmlWindow(self, style=wx.NO_FULL_REPAINT_ON_RESIZE); self.krtc.LoadPage("apitest.html") [/CODE] However, I'm having real problems trying to pick up a CTRL + C event (Or a right mouse click event) to copy any selected text. …

Member Avatar for MaxVK
0
121
Member Avatar for punmeister

Hey hey! I'm trying to write a script that finds out if a given program name exists in the OS environments PATH variable (cross plathform). Thing is, I get a NameError, it's probably a simple error, but I've struggling with it the last hour. Any help would be appreciated [CODE=python] …

Member Avatar for punmeister
0
119
Member Avatar for neta_s

Hi, I have some oython application which uses some COM server. on of the functions in the COM servers expects getting 64 bit unsigned integer (i.e. VT_UI8), but the problem is that python automatically converts 'small' integers to 32 bit integers (even if casting them to long) anf this leads …

0
33
Member Avatar for Darkangelchick

Hi guys, I'm currently working on a program to return whether an inputted number is perfect or not. I've found that the formula for the perfect number is If 2n-1 is prime then 2(n-1)(2n-1) is perfect. I've worked out some code, but I'm stuck. [CODE]Def listfactors(n): For 1=2 to n/2 …

Member Avatar for lllllIllIlllI
0
137
Member Avatar for Darkangelchick

Hey guys im doing the NCSS python challenge and I need help!! ok so here's my current problems (p.s. my teach cant even help) PROBLEM 1 ************************ [code]# This is a Python file def fibonacci(n): return (n <= 1) and 1 or fibonacci(n-1) + fibonacci(n-2) def decrypt(s): def helper(s): return …

Member Avatar for Darkangelchick
0
211
Member Avatar for powrhouse1

Hi, i'm new to python. I'm trying to input a stack of (prefix.tif) images, modify them to png files and output the new files as prefix.png. One code that i was told to use allows me to modify the input name by adding something to the beginning of the name. …

Member Avatar for powrhouse1
0
94
Member Avatar for aodpreacher

I want to make a python game with just the basic python library and Tkinter.. is this possible ? and also where would i go to find the logic behind the Simon Game..the memory part so it makes the buttons click and remember each time? also this is for a …

Member Avatar for Freaky_Chris
0
98
Member Avatar for adam291086

Some languages like C# create an Auth object to authenticate themselves on a soap server. for example [CODE] cpLatestBrief.authValue = new auth(); cpLatestBrief.authValue.username = "username"; // your aql username cpLatestBrief.authValue.password = "password"; // your aql password [/CODE] how can you do this with python?

Member Avatar for adam291086
0
98
Member Avatar for kempablavitt

Hi! I need help with a memory game. I dont know how to do when I want the users choice to appear. The function guessing. I want the user to first write e.g. A1 and then B2. and the doldmatris() is the one with the words. Then the start function …

Member Avatar for Murtan
0
263
Member Avatar for DarkSam

I need help with this problem Generating Random Cities Write a function called generate_cities(min_x, max_x, min_y, max_y, n, distance) that generates a list of cities with random coordinates. The parameters represent the following: * min_x, max_ x: the minimum and maximum values for the x coordinate of each city * …

Member Avatar for Murtan
0
81
Member Avatar for Stefano Mtangoo

I enter first time and works fine, but second time? Boom, it fails! What is wrong Best regards: [CODE=python] #Global values #key is ID/name and value is cost product = dict() identity = dict() #Function to check and add product and its ID def get_prod(): #anything can be a name …

Member Avatar for Stefano Mtangoo
0
70
Member Avatar for lllllIllIlllI

Yesterday, i was programming a program in Java when i came accross something i though was just amazing. I could read and write complete Obects with just one line of code! They would go to a file and when i loaded then they would be straight back, without me having …

Member Avatar for lllllIllIlllI
0
84
Member Avatar for adam291086

I am trying to read in a simple xml file and display all the child elements all i get is the error [QUOTE]Traceback (most recent call last): File "/Users/adamplowman/Documents/Uni/project/python/test_xml.py", line 10, in <module> for element in tree: TypeError: iteration over non-sequence[/QUOTE] Here is the xml file [CODE]<root><child>One</child><child>Two</child></root>[/CODE] and this is …

Member Avatar for adam291086
0
164
Member Avatar for adam291086

I have the variable Adam that contains some information. Later on i have some more information to add to the variable adam. How can this be done something like [CODE] adam = "john" adam = adam + "mike" [/CODE]

Member Avatar for paddy3118
0
90
Member Avatar for Stefano Mtangoo

Hello All Greetings I want to use Lame enc windows DLL procedures. I'm not very dipped in DLL things but it is that I want to use it in my Encoder. Any way can I use it in python?? Also Any suggestion on CD ripping library and Vobis/Ogg/Flac/wma encoder library …

Member Avatar for Stefano Mtangoo
0
193
Member Avatar for ihatehippies

Im trying to write a script that can return directions to an address from google. I've looked over urllib for a while and I cannot figure out how to send the information to the server and then retrieve the directions.. any ideas?

Member Avatar for ccandillo
0
250
Member Avatar for Prahaai

Good day. I wanted to share with you the code for an application I've created. It can read the number of pages in all the PDF files from one directory. The question I have is this : does it need more optimisation ? Can I make it work faster ? …

Member Avatar for Prahaai
0
4K
Member Avatar for OB_

Hi there, new programmer/python user here. What I'm trying to do, is simulate the rules of a tabletop RPG (not nerdy in the slightest). This is using a 10-sided die. In the game when you roll a 10 the dice "explodes" and you roll it again and add the next …

Member Avatar for Gribouillis
0
76
Member Avatar for dseto200

What's the command that allows you to do that. The chapter that i'm reading lists slicing, but I don't see how that helps if you don't have a fixed value of the word. [Code=Python] # Program that gets a message from user and computer prints it out backward. message = …

Member Avatar for dseto200
0
222
Member Avatar for rastaberry

Greetings, I would like to make a programm that would generate a long string of numbers or characters in the way that the user firts states how long the so called word should be (let's say 10 000) and will also state the rules for creating the word: i.e. 1 …

Member Avatar for rastaberry
0
85
Member Avatar for goldsm

I am writing a program using Python and the PYOpenGL3 library. I am trying to use PY2Exe to create an executable version of my program. However PY2Exe does not support PYOpenGL3. Is there an alternative to PY2Exe I can use? Basically I need a way to create an executable version …

Member Avatar for vegaseat
0
89
Member Avatar for Bouzy210

I am trying to write a script where it traverses the current folder and all subfolders and files and prints to screen the name of the files, filesize, and date last modified. e.g. test0.xml | 26 bytes | 11/21/08 23:35:28 (I can get it to do this) Folder/test1.xml | 26 …

Member Avatar for Bouzy210
0
115
Member Avatar for ping24

Hi Guys, I want to write a parser in python. But I am not able to understand that what could be the starting point(some urls and references) so that I can write simple parsers. I just want to have some basic ideas on py parsing methods and techniques. Well I …

Member Avatar for Gribouillis
0
75

The End.