15,175 Topics

Member Avatar for
Member Avatar for Archenemie

This one has got me completely, i cant see why the notebook doesnt show, i wanted the gui interface i have already built to show on page 2 of the notebook, but for some wierd reason the page just comes up empty, and it is really baffeling me. Can anyone …

Member Avatar for Archenemie
0
262
Member Avatar for narfman0

Hello all, I am trying to automate my builds so that when I commit a branch with a particular url to my svn repository, my python script (which runs twice daily) will pick up on it, do a build, and upload it to a new trac downloads page. Right now …

Member Avatar for narfman0
0
178
Member Avatar for dbphydb

Hi, I am basically from QA. What we testers do each day is 1. Open a web browser. Type in [url]http://hostname:8080/cruisecontrol[/url] (since we are in a particular network, only we can access this) 2. Check if the latest nightly build has been successful. If it is successful, deploy it on …

Member Avatar for TrustyTony
0
83
Member Avatar for daviddoria

I am trying to parse the content of a wiki page. In a string like this: [code] ==Heading1== <test> some text here </test> ==Heading2== <test> even more text </test> [/code] I need to obtain "Heading1", "some text here", "Heading2" and "even more text". I got this to work: [code] import …

Member Avatar for daviddoria
0
15K
Member Avatar for DayneD89

OK, I'm new to python. I'm writing data to a file, but it won't write that data to a new line. I'm ending up with a single line file that reads as [QUOTE]2.0/n3.0/n2.0/n3.0/n2.0/n3.0/n2.0/n3.0/n2.0/n3.0/n2.0/n3.0/n2.0/n3.0/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[2.0, 2.0]/n[3.0, 3.0]/n[/QUOTE] When …

Member Avatar for DayneD89
0
5K
Member Avatar for freakn_style

[U][B]Explanation on why program must maintain simplicity:[/B][/U]I am a peer tutor of a computer programming class and my teacher has asked me to develop a few simple games to teach the class. This is the first year the school has taught Python (thanks to my final project last semester, and …

Member Avatar for freakn_style
0
1K
Member Avatar for notuserfriendly

Hello, i am currently writing an assembler for the theoretical SIC/xe machine and i decided to do it in python. Very new to python but i thought it would be fund to do it in and willing to learn. So far i know what to do and have the diea …

Member Avatar for woooee
0
504
Member Avatar for Ntsoaki

[code] import sys import random sys.setrecursionlimit(1500) def prime(n): """ Generate all prime numbers less than n. """ yield 2 primes = [] for m in range(3,n,2): if all(m%p for p in primes): primes.append(m) yield m n=int(raw_input()) i=0 j=0 while(n!=-1): p=list(prime(n)) sun=0 while(sun!=n and i<1000000000000000000000000000000): F=random.sample(p,4) sun=sum(F) i+=1 if(sun==n): for i …

Member Avatar for TrustyTony
0
138
Member Avatar for Ntsoaki

Hi i am new in python,i have just got a question below A friend of yours has just bought a new computer. Until now, the most powerful computer he had ever used was a pocket calculator. Now, looking at his new computer, he is a bit disappointed, because he liked …

Member Avatar for TrustyTony
0
279
Member Avatar for JJBallanger

I have recently been given quite a complex piece of work to do by my computer science supervisor. The idea is that the function:- [def shape_resistivity(shape,R):] allows the user to input a shape and resistance value like so: [CODE] [shape=[\ ' ', '++++', 'xxxx', 'xxxx', 'xxxx', '----', ' '] [/CODE] …

Member Avatar for JJBallanger
0
623
Member Avatar for Arfarf

Howdy! I'm trying to get my head around some simple pattern matching or regular expressions using python. Basically I want to be able to match "Failed 0.00/100.00", where 0.00 could be any decimal number. I know using perl it would be something along the lines of "\d+\.\d+\/100\.0", but could anybody …

Member Avatar for Arfarf
0
119
Member Avatar for peppermints

So I'm trying to get it to update the score by 30 each time a fly is hit. I've tried this a number of ways, but none of them seem to be working. Here is my code (I've commented out some unneeded things so I didn't have to upload so …

Member Avatar for vegaseat
0
1K
Member Avatar for carpenoctem

Haha, still not getting the hang of this, I am afraid. I have written a script: [CODE]#!/usr/bin/env python print ("Hello, world!") name = input("What is your name? ") print ("Hello, " + name + "!")[/CODE] I have saved it as hello.py. And I try to make it executable in terminal: …

Member Avatar for vegaseat
0
310
Member Avatar for DancingDana

Hello, I've got this directory with files that contain a number in their file name. I need to check what the number is and then I need to move the file to a different directory. Right now I'm using shutil to do this, but for some reason it copies the …

Member Avatar for DancingDana
0
220
Member Avatar for sarfrazashfaq

Hi there I am translating PERL code into PYTHON Code My PERL code is if ( my $client = $dealing_clients->{ $data->{fundId} } ) And i translated it into python as if (client = dealing_clients[data["fundId"]]): But it is giving my following Error "Syntax Error While detecting Tuple" Any one know how …

Member Avatar for sarfrazashfaq
0
691
Member Avatar for carpenoctem

I am trying to run my first program/script (pardon my bad terminology, I am a newbie), and just doesn't work. I am using Ubuntu, and IDLE. and I have written: [CODE]print "Hello, world!" [/CODE] I saved the file as hello.py. Tried to click Run - Run Module, but then it …

Member Avatar for carpenoctem
0
97
Member Avatar for Archenemie

I need to make it so when i click the Do IT botton the variables ive shown take the values of the text control box ive selected, and after an hour trolling the internet and trying different lines of code i still have no clue. Does anyone have any ideas? …

Member Avatar for vegaseat
0
260
Member Avatar for Robbert

Hi, I could do with some help with how to clear a panel(self.panel1) so the new buttons load in a new/clean panel(self.panel1) in the following code when either "Button One" or "Button Two" has been selected at the top of the frame. I have tried everything I could think of …

0
268
Member Avatar for nsutton

Ok so I'm working on an address book app in python. the user writes contacts into a txt file and can search for it and everything.(run the code yourself if you want to see what it does) now for my problem, under "#if editing" i want have the user search …

Member Avatar for nsutton
0
2K
Member Avatar for leegeorg07

Hi again i have programmed a thing that asks for 2 numbers and does a series of things to it.But i want to round the square-rooted numbers to about 6 digits e.g. 5.12345. How can this be done? Here is my code: [ICODE]from math import sqrt running = 'Y' while …

Member Avatar for vegaseat
0
488
Member Avatar for SgtMe

Hi. I'm just trying to make a simple analogue clock as I learn to use TKinter with python. I need to know the maths behind calculating the x, y values for drawing the end of the hands. I don't need to post the whole program, all you need to see …

Member Avatar for SgtMe
0
967
Member Avatar for nsutton

How can i use this code (below) to take the random numbers from the dice roll and change 6 to "A" and 5 to "K" and ect. [CODE]#Poker Dice! Noah Sutton 4/24/10 import random rounds=0 #roll dice def roll_dice(): #Dice variables dice1=random.randint(1,6) dice2=random.randint(1,6) dice3=random.randint(1,6) dice4=random.randint(1,6) dice5=random.randint(1,6) '1'=9 '2'=10 '3'=J '4'=Q …

Member Avatar for Hummdis
0
4K
Member Avatar for cyon

How do I apply a function to a selective number of values in a list of lists using a list comprehension without filtering the values that are not passed through the function? Specifically, I have a list: [[4, 5, 6], [2, 4, 5]] And I want to square only the …

Member Avatar for TrustyTony
0
177
Member Avatar for Danthier

Pretty new to Python, but I have some background in C and VB. Just joined this site because I couldn't find anywhere else to get Python help! I'm working with VPython in the IDLE environment, and I'm having a problem changing a variable using a toggle switch and a function. …

Member Avatar for Danthier
0
289
Member Avatar for the_mia_team

Got this project and started with some guide, you guys think im heading in the right direction? also how would I bring up the 10 channels when the guide function is called? [QUOTE]The program always display the current mode of the Tivo: A. viewing live channel B. channel recording C. …

Member Avatar for the_mia_team
0
476
Member Avatar for joshua91

could someone please help me in forming a loop as i am stuck... [CODE] def numbergen(): randomnumber = random.randint(0,100) print randomnumber def main(): Question = float(raw_input("Do you wish to play the Guess a Number Game?(Y/N)")) for Question: if Question == N: break else: print "randomnumber" main()[/CODE]

Member Avatar for Hummdis
0
155
Member Avatar for rasizzle

Hey Guys, I'm trying to do a basic line graph here, but I can't seem to figure out how to adjust my x axis. [CODE]from pylab import * plot ( range(0,10),[9,4,5,2,3,5,7,12,2,3],'.-',label='sample1' ) plot ( range(0,10),[12,5,33,2,4,5,3,3,22,10],'o-',label='sample2' ) xlabel('x axis') ylabel('y axis') title('my sample graphs') legend(('sample1','sample2')) savefig("sampleg.png",dpi=(640/8)) show()[/CODE] And here is the …

Member Avatar for woooee
0
364
Member Avatar for pietromarchy

Hi guys, I need your help. I am using python to synchronize several c programs. For one of these programs I need a dynamic interaction. I know there are several option: I am interested in the simplest one becouse I am noob. Python code and C code have to exange …

Member Avatar for pietromarchy
0
536
Member Avatar for LarZ

Hey guys, here's a simple one: I'm developing a load test suite (for GSM networks) at the moment and i have scripts that create traffic patterns and all that. I am developing a GUI for the test suite that dynamically adjusts the layout and controls which are displayed on a …

Member Avatar for Dixtosa
0
4K
Member Avatar for Romber

Hi everyone, This is my first time here, so if I don't do everything up to how it should be done, bear with me. Anyways, for a project in my python class I am having trouble generating a webpage with clickable links. I am using Python 2.6.5 and will be …

Member Avatar for Hummdis
0
624

The End.