-
Replied To a Post in There is an elephant on the loo!
> Greased pole climbing, rock throwing and mud fighting were part of the 2004 Summer Olympics in St. Louis USA. Weren't the 2004 Olympics in Athens? -
Began Watching Python multiprocessing: How to reload processes when a config is modified
I am using python multiprocessing lib and I would like to reload a list of processes every x time. In other words, when the configuration is modified, all processes should … -
Replied To a Post in Python multiprocessing: How to reload processes when a config is modified
I would use a Manager dictionary which would contain 1. a counter or other method that can be easily compared to the original to show that there is a change … -
Replied To a Post in There is an elephant on the loo!
The United States secured the #1 ranking in wealth inequality. Note that wealth is not income [Click Here](http://economix.blogs.nytimes.com/2014/04/02/the-wealth-gap-is-growing-too/?_php=true&_type=blogs&_r=0) -
Replied To a Post in Help with Hangman program
You can also eliminate some of the redundancy when printing the hangman def print_hangman(turn): print("turn=%d" % (turn)) if turn >= 1: print(' |') if turn >= 2: print(' O') if … -
Began Watching Help with Hangman program
I have been working on this program for a few days and have most of it working, the only issue that I am having is when a word has multiple … -
Replied To a Post in Help with Hangman program
You can pass an optional start location to .find() but that means iterating over the entire list several times. Another way word="APPLE" guess="P" hint=["-" for ctr in range(len(word))] print "initial … -
Replied To a Post in Random Facts
The tipped minimum allows employers to pay less than the regular minimum wage to workers who customarily earn tips, assuming gratuities boost them past the current $7.25 hourly rate. The … -
Replied To a Post in Random Facts
How about a reference for "noli mentula" which I just looked up. Good one. -
Replied To a Post in Memorable Quotations
Press enter to exit by way too many of us -
Replied To a Post in Memorable Quotations
I forgive not because I became a saint, but because I’m tired of hating. Paulo Coelho -
Replied To a Post in Random Facts
Here is a source for those who are not too lazy too look it up themselves when they want to know more www.google.com This thread is here for fun, it's … -
Replied To a Post in Random Facts
Mice multiply so rapidly, in theory a new litter every 3 weeks, that two mice could grow to 100,000 in one year. If they all lived in an area with … -
Replied To a Post in Things I hate about TV shows
Fox's "all ads all the time" in sports. It looks like I'm not alone. From http://www.sportsmediawatch.com/2014/10/mlb-postseason-tv-ratings-2014-tbs-up-fs1-down-royals-orioles-cardinals-giants/ "Overall, six of the seven playoff games on TBS have had double-digit increases in … -
Replied To a Post in Creating a Caesar cipher using basic programming
Neither, as your logic is not at all correct. If you aren't going to take my advice, i.e. print "i", then there is not much point in posting anything further. -
Began Watching Creating a Caesar cipher using basic programming
Hello! First time posting here so bare with me with my formating and other stuff. I've got a task were I'm going to create a caesar cipher. You should be … -
Replied To a Post in Creating a Caesar cipher using basic programming
I would suggest that first you print "i" as it is probably not what you think it is. See [Click Here](http://www.ibm.com/developerworks/library/os-python6/index.html) "for loop and a string" Second, you want to … -
Replied To a Post in Things I hate about TV shows
In the vein of interfacing with an alien's computer, the plot of the James Bond film, GoldenEye, was electronically transferring everything from the Bank of England and immediately triggering an … -
Began Watching Syntax Error
What's wrong with: def project_to_distance(point_x, point_y, distance): dist_to_origin = math.square_root(point_x ** 2 + point_y ** 2) scale = distance / dist_to_origin temp1= point_x * scale temp2= point_y * scale print … -
Replied To a Post in Syntax Error
1. your indentation is not correct (and can not be corrected because you did not say what you are trying to do). 2. you do not import math 3. math … -
Replied To a Post in Random Facts
Over half of fast-food "front-line" workers are on some kind of government assistance (foodstamps, etc.) because they don't make enough. The average pay for the president of a fast-food company … -
Replied To a Post in Random Facts
And by association, disk drive manufacturing and jobs. -
Began Watching Bad computer habits
Here's Some of my habits that i picked up over the years, How about you? - Refresh every 5min - my fingers are on "A", "W" and "D" keys - … -
Replied To a Post in Bad computer habits
What, no one has mentioned writing a sloppy, undocumented program because it is a one-time quick and dirty use. Murphy's law says you will still be using that program 10 … -
Replied To a Post in Dynamically update label text python Tk
And if you want better answers you will have to ask better questions. You have said nothing about updating the label multiple times or anything about the conditions under which … -
Replied To a Post in Dynamically update label text python Tk
You only call update_label_1 one time so the label is only updated once. This updates the label every time the button is pushed. class UpdateLabel(): def __init__(self): self.master = tk.Tk() … -
Began Watching Dynamically update label text python Tk
Hi, I wrote a small app which have some different pages but now i have a problem with update dynamically a label text from one of the pages. I would … -
Replied To a Post in Dynamically update label text python Tk
grid() returns None so self.label1 equals None in the code you posted. There are two ways to update a label, illustrated below. There is way too much code here for … -
Began Watching examples of if statement in python
give a grammar and example of if statement for each of the following languages: a)perl, b)python -
Replied To a Post in examples of if statement in python
Start here with your post [Click Here](http://www.daniweb.com/forums/post3625.html#post3625 ) -
Began Watching Need Help!!
Hi, I am really stuck on this problem. I am supposed to write a function that takes in the number of rows of the mountain range as a parameter. The … -
Replied To a Post in Need Help!!
You would use a list of lists. One sub-list for each row, so if the data is 1, 3, 2, 7, 5 and you are drawing the third row, you … -
Began Watching How to select a certain sequence in fibonocci?
I'm trying to use this code for a fibonocci sequence where I'm setting the starting numbers as b= and c=. What I'd like to do though is have it stop … -
Replied To a Post in How to select a certain sequence in fibonocci?
> I've tried a 'for i in range(53):'loop but > that doesn't work for this Why not? It seems like the proper way to do this. Note that you salt … -
Replied To a Post in Python subprocess return code without waiting with multiprocessing
Write program to run some test code in parallel and use a while loop to check is_alive() for each process and/or a manager dictionary that is updated when the function/thread … -
Began Watching Python subprocess return code without waiting with multiprocessing
Hello all, My question is hopefully particular enough to not relate to any of the other ones that I've read. I'm wanting to use subprocess and multiprocessing to spawn a … -
Replied To a Post in Python subprocess return code without waiting with multiprocessing
You will have to continuously check the status of the processes, or the value of some variable/dictionary/object to know when it changes. You can use is_alive() to check the status … -
Replied To a Post in Memorable Quotations
18. Hypocrisy When the Way is forgotten Duty and justice appear; Then knowledge and wisdom are born Along with hypocrisy. When harmonious relationships dissolve Then respect and devotion arise; When … -
Replied To a Post in Memorable Quotations
The conscious and intelligent manipulation of the organized habits and opinions of the masses is an important element in democratic society. Edward Bernays -
Began Watching UnboundLocalError: local variable 'B' referenced before assignment
Help! UnboundLocalError: local variable 'B' referenced before assignment. Thanks! if a >= 3: A = (3 ^(int(log((a/3), 2)* 3))) if b >= 3: B = (3 ^(int(log((b/3), 2)* 3))) if … -
Replied To a Post in UnboundLocalError: local variable 'B' referenced before assignment
puntaje = str(int(A + B + C + D + E + F + G + H + I + J + K + L)) If "B", or any variable … -
Replied To a Post in Memorable Quotations
Saw this one one the web so I guess it's a quote A gaggle of geese A murder of crows A bribe of politicians -
Replied To a Post in Pyserial Error
Add if ser.isOpen(): print "open" ## read and write code goes here else: print "closed" to first make sure the port is open. Are you using Python3 and trying to … -
Began Watching TypeError: attribute of type 'NoneType' is not callable object
Hi all, I'm working on my python script as I'm pulling the data from the sqlite3 database. I'm trying to convert the string object to datetime object, but I have … -
Replied To a Post in TypeError: attribute of type 'NoneType' is not callable object
The docs are always a good place to start [Click Here](https://docs.python.org/2/library/datetime.html) Strftime is part of the datetime.date class, not datetime.datetime. -
Began Watching Pyserial Error
I'm using python to try and talk to my Arduino with pyserial. The code should wait for an input from COM5, (the arduino), and then sends a 1 and waits … -
Replied To a Post in Pyserial Error
PySerial finds the port by he offset so the first port would be offset 0, since it is at the beginning. Port #5 would offset the first 4 ports from … -
Began Watching displaying an image without adding the file format using PIL
hi, i have written a function that can search through a folder and display a picture in a new window if the file is present but i always have to … -
Replied To a Post in displaying an image without adding the file format using PIL
I don't see anything in your code that is adding an extension.You might want to use the [FileDialog](http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/tkFileDialog.html) module to get the file name. Also note that you have duplicate … -
Replied To a Post in cmplex python problem
For any future searchers, it is the position in the string that is important. Note that the OP is checking "n" for even or odd, not the number itself. But …
The End.