407 Posted Topics

Member Avatar for The Dude

The Gamucci Micro Electronic Cigarette (a rechargeable, electronic, smoke anywhere cigarette) for £49.95 should be the perfect gag gift.

Member Avatar for ZZucker
0
147
Member Avatar for Doctor Inferno
Member Avatar for ZZucker
0
107
Member Avatar for sittas87

[QUOTE=omol;675719]It's not that they forgot, it's that 2 digits took up one hell of alot less memory than 4. It's from a time when people were forced to close things to stop memory leaks because there was that little of it. Not like now, who cares if you loose a …

Member Avatar for ZZucker
0
116
Member Avatar for Ancient Dragon

[QUOTE=Ene Uran;672211]... That is the way geography is taught in our public schools. ...[/QUOTE]You are giving the educational level of the US public school system too much credit. Of course I went to a Roman Catholic school, and we at least covered parts of Italy.

Member Avatar for ZZucker
1
80
Member Avatar for Derme

In the second approach you should use class1.btn.config(command = self.update)

Member Avatar for ZZucker
0
27
Member Avatar for Stefano Mtangoo

Tutorials for the wxPython GUI toolkit: not bad ... [url]http://wiki.wxpython.org/AnotherTutorial[/url] this is one I like ... [url]http://zetcode.com/wxpython/[/url]

Member Avatar for ZZucker
0
135
Member Avatar for ZZucker

Just a place you can bitch about the different generations. Don't be bashful, spill your opinionated guts! Here is my analysis: Oldies Generation ... people born before 1930 Silent Generation ... people born between 1930 and 1945 Baby Boomers ... people born between 1945 and 1961 Generation X ... people …

Member Avatar for R0bb0b
0
305
Member Avatar for Salem

[QUOTE=Lardmeister;660521]What other purposes would you do in a church?[/QUOTE]One of our neighborhood churches was converted into a dance studio.

Member Avatar for sneekula
0
155
Member Avatar for Scuppery

Let's put some bigotry on the other shoe: What is the difference between a man and a government bond? Bonds mature What did God say after creating man? I can do better What do you call a man with half a brain? Gifted What does a man consider as a …

Member Avatar for abetageek
-2
275
Member Avatar for sneekula
Member Avatar for sittas87
0
52
Member Avatar for bikehike90

Create a frame in your top window and put your widgets on that. A frame destroy will destroy the frame and the widgets on it. Now you can create a new frame and widget set.

Member Avatar for Gribouillis
0
93
Member Avatar for iamoldest

You have to let your function return something and assign it after the call: [code=python] something = 1 def dosomething(): something = 2 return something print something something = dosomething() print something [/code]

Member Avatar for ZZucker
0
123
Member Avatar for Aia
Member Avatar for loken

Windows supports real multitasking, it can boot and crash simultaneously.

Member Avatar for techbound
0
177
Member Avatar for The Dude
Member Avatar for thatoneguyx

These are the name, age arguments of that particular instance linking back to the superclass. In other words, each inherited superclass is unique to that instance.

Member Avatar for thatoneguyx
0
105
Member Avatar for david_09

As far as I understand it, Python has a very efficient builtin memory manager and user memory allocation is not need or wanted.

Member Avatar for vegaseat
0
127
Member Avatar for devstudio.2007
Member Avatar for docaholic

Maybe something like this: [code=python]def bubbleSort(list1): swap = False for j in range(len(list1)-1): for k in range(len(list1)-1-j): if list1[k] > list1[k+1]: list1[k], list1[k+1] = list1[k+1], list1[k] swap = True if swap == False: break list1 = [4, 6, 2, 8, 1] bubbleSort(list1) print list1 # [1, 2, 4, 6, 8] …

Member Avatar for docaholic
0
141
Member Avatar for zandiago

There are plenty of good jobs around the LA area, somebody has to take care of all the damaged hero veterans.

Member Avatar for zandiago
0
101
Member Avatar for MikeyFTW

Look in "Starting wxPython (GUI code)" right on this forum, for instance: [url]http://www.daniweb.com/forums/post624835-12.html[/url]

Member Avatar for ZZucker
0
119
Member Avatar for 2ashwinkulkarni

There are some dangling lines in your code like: Link_Name,Link_Model,Router_A,Router_B,Data_Rate,Direction,COIN=fields or CELL_NAME, SWITCH, SWITCH_NAME, LONG, LAT, COINS=fields Are those comments? If yes, they need a # in front.

Member Avatar for 2ashwinkulkarni
0
120
Member Avatar for db_ozbecool

Nice observation! Trap the error with try/except like this: [code=python]def my_func(aaa, main_var=None): try: mvar = [key for key, val in main_var.items() if val==aaa][0] print aaa, main_var, mvar except: print aaa # other code follows pass def main(): test_var = 123 my_func(test_var, vars()) my_func(123, vars()) my_func(456, vars()) my_func(123) main() """ my …

Member Avatar for ZZucker
0
313
Member Avatar for itdupuis

I just saw that in my LA neighborhood: $4.99 for a gallon (3.8 liters) of regular gasoline. I guess the fuel wars are on in the good old USA! For our friends in Europe, that's 0.85 Euro per liter.

Member Avatar for Ene Uran
0
159
Member Avatar for joshmo

Watching and listening to the surf come in, is very inspiring to my creativity. Not quite sure how my notebook handles sand and salt.

Member Avatar for 0named
0
355
Member Avatar for ericstenson

Looking for a male couch/mouse potato with a large beer belly and a minor amount of hair on top, should be ugly enough to scare any insects out of my place.

Member Avatar for jephthah
0
471
Member Avatar for anakastakis

anakastakis: Thank you for giving the rest of us the solution of your problem.

Member Avatar for preyan
0
638
Member Avatar for Lardmeister

The internal run (ctrl/F9) is pretty klutzy when you have even the slightest error in your code, it simply shuts down!!!! The external run (alt/F9) behaves more normal, showing you the error message in the output window. So, I would say use alt/F9. The little green run symbol should have …

Member Avatar for sneekula
0
133
Member Avatar for smartdog

Save your script as somefilename.py and double click on the name to run it from the Windows file manager. Or better, use the editor of an IDE like IDLE, DrPython or PyScripter to write your code and run it from there. See: [url]http://www.daniweb.com/forums/thread20774.html[/url]

Member Avatar for Fuse
0
225
Member Avatar for TheOneElectroni

Use something like this: [code=python]self.button2 = Button(frameToolbar, text="PRINT", bg="light green", width=5, relief=RAISED, font=("Verdana", "9", "bold"), command=self.print_) self.button2.grid(row=0, column=0) self.button = Button(frameToolbar, text="CLOSE", bg="red", width=5, relief=RAISED, font=("Verdana", "9", "bold"), command=self.destrparent) self.button.grid(row=0, column=1) self.button1 = Button(frameToolbar, text="SUM", bg="light blue", width=5, relief=RAISED, font=("Verdana", "9", "bold"), command=self.mult) self.button1.grid(row=0, column=2) [/code] Please use code tags …

Member Avatar for TheOneElectroni
0
3K
Member Avatar for parmenio79

You have simple use the try/except error routine: [code=python]numblist = [1 , 2 , 3, 5, 6, 7, 8, 9, 11] for i in numblist: try: if numblist[i] == numblist[i + 1] - 1: print 'yay' else: print 'gap' except: pass [/code]

Member Avatar for parmenio79
0
27K
Member Avatar for Salem

Hopefully it's 41 month at hard labor! Oh yes, no computer in the prison cell, and let his cellmates be 350 pound horny roughnecks.

Member Avatar for Lardmeister
0
98
Member Avatar for preyan

Go Settings/Preferences/Calltips and mark enable. It works, but is rather poorly implemented.

Member Avatar for preyan
0
96
Member Avatar for lllllIllIlllI

Welcome to the world of self! Just a side note, the Python style guide recommends to start class names with upper case and function/method names with lower case. If you write larger programs, this really helps. The Python style guide by GVR himself: [url]http://www.python.org/peps/pep-0008.html[/url]

Member Avatar for lllllIllIlllI
0
181
Member Avatar for saywell
Member Avatar for Mackjan
Member Avatar for dangermini

I suggest you study your class notes more carefully. Here is a short example that might help you: [code=python]class Die(object): def __init__(self, v): """ the constructor of the class self 'carries' the instance dice initially has value v """ self.value = v def __str__(self): """overload __str__ will be used in …

Member Avatar for dangermini
0
85
Member Avatar for The Dude
Member Avatar for jephthah
0
264
Member Avatar for majestic0110

Eating a large amount of beans and then do one or more of the following: Take a bubble bath. Get my teeth checked at the dentist. Go to an IRS audit. Go to jury duty.

Member Avatar for sneekula
0
262
Member Avatar for The Dude

I wonder if folks celebrate Mothers Day in every country on Earth?

Member Avatar for uniquestar
0
47
Member Avatar for mattyd

Paranormal experts say the peak of people's ability to see ghosts is when they're 7 years old. Sorry, I put this in here by accident, but then it could fit here just as well.

Member Avatar for ~s.o.s~
3
10K
Member Avatar for jbennet
Member Avatar for FreezeBlink

The standard try/except way would be: [code=python]def choose(s): try: return "You entered " + { '1' : "one", '2' : "two", '3' : "three" }[s] except: return "Bad input" var1 = raw_input("Input a number between one and three: ") print choose(var1) [/code]Or straight foreward with dictionary method get(): [code=python]def choose2(s): …

Member Avatar for kdoiron
0
1K
Member Avatar for tkpython

Vegaseat has given Tkinter a namspace tk. Good coding practice to avoid method collisions, and to tell folks that read your code where the method came from. Is that what's confusing to you?

Member Avatar for ZZucker
0
183
Member Avatar for jephthah

The whole thing is a little bit like the painted flags on some military uniforms. Most folks don't know what they are for. I always thought that the stars where the LOL count.

Member Avatar for jbennet
0
387
Member Avatar for drjekil

With Python that is a simple task: [code=python]import os # list just the files in a given folder folder = 'C:/Temp' for (paths, dirs, files) in os.walk(folder): # testing, this shows a list of filenames print files # now loop through the list of filenames for filename in files: # …

Member Avatar for ZZucker
0
82
Member Avatar for Igor_MK

[QUOTE=Igor_MK;602567]ok I used: [code=python] diffInstance = difflib.Differ() diffList = list(diffInstance.compare(list1, list2)) [/code] and this returns a list of words with + - before them. As I read and understand probably - means just list1 has the word, and + that just list2 has the word. And I'm not getting and …

Member Avatar for woooee
0
168
Member Avatar for maui_mallard
Member Avatar for jbennet
2
311
Member Avatar for dise652
Member Avatar for DangerDev

[QUOTE=joshSCH;523925]You serious? Yahoo has been sucking the last few years. Yahoo should take the money and run... and I guarantee that's what they'll do.. And yeah, of course Microsoft wants dominance on the web.. However, they wont have long.. Once the dems take control of all three branches of government, …

Member Avatar for sneekula
0
582

The End.