614 Posted Topics

Member Avatar for nizbit

We can fix that with one character, a lowly comma :) If you put the comma after the print statement it should work [code] for x in range(1, len(depend)): #comma after the whole statement print "%05s" % ('I#'+str(x)), [/code] hope that helps EDIT: Also you need to have the percentage …

Member Avatar for nizbit
0
153
Member Avatar for caperjack

Yeah i must admit i have noticed that number always seems to look a little low recently

Member Avatar for caperjack
0
155
Member Avatar for HiHe

I'll say the same, its worked a treat on my computer, and apart from the usual IDLE annoyances with wxPython its all running smoothly. :)

Member Avatar for mn_kthompson
0
112
Member Avatar for emir_gradacac
Member Avatar for python user
-1
211
Member Avatar for sanchitgarg

Well you can use the [iCODE]type()[/iCODE] function to show what type the number is: [code] >>> type(12) <type 'int'> >>> type(12.4) <type 'float'> >>> type(input()) 12 <type 'int'> >>> type(input()) 12.5 <type 'float'> >>> [/code] So you can adapt that to check for any type. So when you input something …

Member Avatar for sanchitgarg
0
86
Member Avatar for Musafir

Okay, so look at your sentence just here: [quote] ask the user for the current population and displays the population after 1/2 years unitil it reaches 1 million at a rate of 8% per year. for example [/quote] That tells you exactly what you need to do, first: [B]Ask the …

Member Avatar for woooee
0
115
Member Avatar for cakka

Newcastle - Australia with Telstra i get 1.5MB/s down and 256kB/s up

Member Avatar for zortec
0
332
Member Avatar for tlj333

Could you post the exact error? That can help a lot. As well there are a few things you need to address. [code] def name_list(): infile = open('names.txt', 'r') names = infile.readlines() infile.close() index = 0 while index < len(names): names[index] = names[index].rstrip('\n') index += 1 return names [/code] When …

Member Avatar for vegaseat
0
130
Member Avatar for Jupiter 2

Ancient Dragon, new favourite golden oldie :P Really though, this whole thread just sounds a lot like "he said", "she said". I havent heart an argument like this since primary school :S

Member Avatar for ~s.o.s~
-4
998
Member Avatar for lllllIllIlllI

That was amazing, in 20 minutes you managed to ban Josh4. Im quite impressed at the speed you work at. And the forums are all clean again. So you really will only have noticed him if you were on here for a period of about 20 minutes :) So congrats …

Member Avatar for jbennet
3
196
Member Avatar for Yeen

Steve's code is almost right :) The problem is in line 5 [code] line.replace('.','') [/code] The problem with that is that it doesn't store the new string in the variable automatically, so just add a [icode]line = [/icode] in front of that and it should be fine: [code] file1 = …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for Polar67

And also change the like [code] app.Mainloop() [/code] to [code] app.MainLoop() [/code]

Member Avatar for vegaseat
0
91
Member Avatar for ybean4

[B]>Thank you for your friendly answer.[/B] Yeah that wasn't friendly at all, ignore him, it seems a previously banned member has gone around screwing up the forums by posting huge amounts of threads and being rude in answers

Member Avatar for Rashakil Fol
0
123
Member Avatar for Aiban
Member Avatar for lllllIllIlllI
0
92
Member Avatar for stevenpetersen

If you really want to get points for your questions and answers head over to somewhere more suited to it... [url]www.answerbag.com[/url] - Wow, you can get points!!

Member Avatar for stevenpetersen
0
538
Member Avatar for hockfan86

Okay, first of all you need to learn a bit about scope: [url]http://www.network-theory.co.uk/docs/pytut/PythonScopesandNameSpaces.html[/url] That is basically where a variable lives, so you have the problem that when you call [icode]menu()[/icode] the variable option doesn't stay in memory after that function is completed. But don't fret :) that can be fixed …

Member Avatar for hockfan86
0
122
Member Avatar for gunbuster363

You can find out how something is make up by using the [icode]dir()[/icode] function. This lists all of the variables, methods and classes of whatever you put inside the brackets :)

Member Avatar for gunbuster363
0
2K
Member Avatar for lllllIllIlllI

Hi, Im using wxPython for my latest project and i was wondering, how do i make the window go to the best size, so it includes all of the objects on screen? I used to be able to remember... but i forgot :P

Member Avatar for lllllIllIlllI
0
87
Member Avatar for lllllIllIlllI

Hi guys, Im a making a program where i need to be able to specify a folder and have my program import every module from that folder into my program... I was wondering how i would go about it. I can't use something like eval. But yeah, help would be …

Member Avatar for pythopian
0
14K
Member Avatar for jaison2

If you are using python 3 then you just have to change your input and print statements to fit [code] order=int(input("Please enter the price of the order: ")) x=1.50 if order <10: print("the total price including the delivery charge is", order + x) else: print("The toal price including delivery charges …

Member Avatar for snippsat
0
224
Member Avatar for denniskhor

Sooo. What work have you done? Its nice to see a base from which we can help you.

Member Avatar for vansoking
0
1K
Member Avatar for ihatehippies

A lot of developers aren't bothering changing their modules to 3.x I dont upgrade personally because i know if i do i will not be able to use wxPython anymore :( So yeah, also seeing the last newspost was almost a year ago i have a feeling its not that …

Member Avatar for vegaseat
0
111
Member Avatar for mahgobb

There is nothing quite as satisfying as gently closing the book after finishing the story :)

Member Avatar for richman0829
2
203
Member Avatar for sknake

It could help stop it flooding with bot posts or something though.. Otherwise they could make loads.. It could overwhelm the admins :P

Member Avatar for Dani
0
205
Member Avatar for PixelHead777

[url]http://xkcd.com/297/[/url] Sorry, i dont usually link things. But this feels appropriate :)

Member Avatar for woooee
0
229
Member Avatar for The Dude
Member Avatar for Doctor Inferno

Cost a lot of money? What for? The server that ran the movie bandwith or something?

Member Avatar for jbennet
0
88
Member Avatar for Kolz

If you want to write something at the start of a file though you would need to do something like this [code] #opening the file in read ("r") mode f = open("file.txt",'r') #get all that is in the text file so far oldString = f.readlines() #and close it f.close() #delete …

Member Avatar for vegaseat
0
209
Member Avatar for thehivetyrant

Yes you would increase that, but you would also need to completely redraw the whole circle. As well as that you would need to clear the last circle.

Member Avatar for vegaseat
0
8K
Member Avatar for Duki

Hahaha yeah same.. i have been looking everywhere for one.. no luck so far :P

Member Avatar for Will Gresham
0
48
Member Avatar for Ancient Dragon

So is there any way to tell (apart from actually checking the threads) if your posts are being up/down rated?

Member Avatar for VernonDozier
0
1K
Member Avatar for lllllIllIlllI

I have noticed in the Python Forum there is nothing but -1's on all of the threads except one. So what i was wondering is can we limit the amount of down's a poster can do? For example a member such as myself could do up to 10 down points …

Member Avatar for The Dude
2
861
Member Avatar for lllllIllIlllI

Its a great boardgame, i am sure some of you are familiar with. I found a great site to play it online if 7 of us want to go for a game :) [url]http://www.worldleadersthegame.com[/url]

Member Avatar for ddanbe
0
47
Member Avatar for AnonSurf

For moving something you have to do something like [code=python] self.rect = self.rect.move(self.whereyouwantittogo) [/code] As you can see that is just an example, its not using any of the proper variables that are seen in your program. But im sure you get the gist :)

Member Avatar for AnonSurf
0
163
Member Avatar for AndreRet
Member Avatar for Stefano Mtangoo
Member Avatar for Stefano Mtangoo
0
132
Member Avatar for The Dude

[QUOTE]and why it's a good ideal to travel with your truckgun/survival-rifle.[/QUOTE] I sometimes forget how many guns there are in the US. Here in australia it is pretty rare to own a gun and *very* rare for someone to walk/drive around with it. I think in some ways the reason …

Member Avatar for GrimJack
0
108
Member Avatar for lakshaypandey

You know, this was the first question i ever asked when i came to this forum. This is the answer i got :) [url]http://www.daniweb.com/forums/thread122666.html[/url]

Member Avatar for masterofpuppets
0
64
Member Avatar for mahela007

A static method is one that can be called without instantiating the class so [code] >>> class T(object): def test(): print "HI" >>> T.test() Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> T.test() TypeError: unbound method test() must be called with T instance as first argument (got …

Member Avatar for mahela007
0
85
Member Avatar for saikeraku

Have a fiddle around with [code=python] count = 0 while count <= len(s)+2: count +=1 print '*' [/code] That should print out that right amount of asterisks. See if you cant take that a bit further :)

Member Avatar for marecute
-1
110
Member Avatar for lllllIllIlllI

Hi, I have been here for about a year and a half. I originally was only going to stay for just one question but fell in love with the community. So i would like to change my username to something more identifying. So could i change it to "Paul Thompson"? …

Member Avatar for jasimp
0
193
Member Avatar for Aahd
Member Avatar for ahihihi...
0
66
Member Avatar for lukerobi

Im not quite sure what you are doing. But you can do something like this [code] import random as name name.random() name.randrange(1,50) #etc [/code] Hope that helps :P if not, could you explain what you mean a bit more in depth?

Member Avatar for lukerobi
0
166
Member Avatar for moedoc10

So then, what have you done? Post it here and we can help you with specific problems. Take a look at [url]http://www.daniweb.com/forums/announcement114-2.html[/url] if you dont know what i mean

Member Avatar for lukerobi
0
108
Member Avatar for Judgment

Huh, this while loop thing twice is two days. Assignments perhaps? Yes there is, you can always go between while and for loops, its just usually for loops are easier. for example [code] count = 3 while count <50: print(count) count += 3 [/code] See? Still simple,just not quite as …

Member Avatar for vegaseat
-1
297
Member Avatar for The Dude
Member Avatar for lllllIllIlllI

Hi, I have been trying to get a java program that draws a line directly on the screen. I have made ones that draw on JApplets and JFrame's but i cant work out how i can draw directly on the screen without having something in the way. I looked at …

Member Avatar for lllllIllIlllI
0
110
Member Avatar for The Mad Hatter

Okay i have just finished reading the whole thread... And i noticed something you said: [QUOTE]Um, tried Microsoft works back in the bad old days (Windows 3.1) and never touched it since, it was so bad. [/QUOTE] Wow, it was bad back then?! Woop Dee Doo. Things get upgraded, you …

Member Avatar for Evenbit
-5
2K
Member Avatar for lllllIllIlllI

I am making a slider puzzle applet. And i have this problem when i display it as an applet my buttons do not seem to act the same was as they did before i made it into an applet by using a JApplet rather than a JFrame as my extension …

Member Avatar for lllllIllIlllI
0
119
Member Avatar for manathisbest

[QUOTE=manathisbest;1015849] please help![/QUOTE] Sure, we can help. First, what have you done? And second, whats wrong, not just Help! [url]http://www.daniweb.com/forums/announcement114-2.html[/url] <-- read

Member Avatar for masterofpuppets
-1
155

The End.