I live in Veterans Country, and every public place I go to the Fox News Channel is running! I guess they like to hear how wonderful we are doing in Iraq, and how bad the Democrats are.
I live in Veterans Country, and every public place I go to the Fox News Channel is running! I guess they like to hear how wonderful we are doing in Iraq, and how bad the Democrats are.
Okay. You may want to post this in the Windows User Lounge then.
http://www.daniweb.com/forums/forum54.html
Q: "What is the difference between a chess player and a civil servant?"
A: "The chess player moves once and a while."
I'm a great believer in luck, and I find the harder I work the more I have of it.
~~~ Thomas Jefferson
Who said learn C++ in 2hrs???!!
I said learn Windows PowerShell in 2Hrs!!
Sorry!
Wouldn't you get stuck with Microsoft then?
Something one can wear on his hand and use it to rip out someones' intestines.
A surgical tool?
Time zone differences cost the world economy over 12 billion dollars a year in lost efficiency.
Is there another option?
I don't care what you say, but you cannot learn C++ in 2 hours!
How about the Chicago convention that was so hateful that it allowed Nixon to win the election.
Actually a good thing, otherwise China would still be our number one enemy, and Walmart would have nothing to sell.
Hmm, plane #12 looks more like a British Buccaneer bomber.
Just in case I should be right, let me show plane #13 for your invited guess:
My neighbor is roughly 90% white, but has still enough african features so the many bigots in town will routinely call him black. Like black would be something nasty. Black is beautiful!
McCain was probably safer as a POW all those years than fighting on the ground in Vietnam.
Python30 introduces quite a number of major changes to the Python code syntax. I would not use it at this point until it is the official release (end of 2008 projected release date).
This modified Tkinter GUI code allows you to follow your character key strokes on the console display:
# KeyLogger.py
# show a character key when pressed without using Enter key
# hide the Tkinter GUI window, only console shows
import Tkinter as tk
def key(event):
if event.keysym == 'Escape':
root.destroy()
print event.char
root = tk.Tk()
print "Press a key (Escape key to exit):"
root.bind_all('<Key>', key)
# don't show the tk window
root.withdraw()
root.mainloop()
You can use the Tkinter GUI toolkit too:
# KeyLogger.py
# show a character key when pressed without using Enter key
# hide the Tkinter GUI window, only console shows
import Tkinter as tk
def key(event):
if event.keysym == 'Escape':
root.destroy()
print event.char
root = tk.Tk()
print "Press a key (Escape key to exit):"
root.bind_all('<Key>', key)
# don't show the tk window
root.withdraw()
root.mainloop()
Ah, the home shopping channels. They are proof for the old saying that a fool and his/her money are soon parted.
The Israeli Army is the best Army in the world! If they would have been allowed to do the Iraq thing, they would have been in and out in five days.
The Israeli Army should be good, the US taxpayer pays for them.
We must believe in luck. For how else can we explain the success of those we don't like.
Jwenting's second helicopter looks a little like a French made Alouette?
I think it depends on what type of steel and type of spider you are talking about.
Now, I find this amazing:
A strand of spider silk long enough to circle the earth would weigh less than 16 ounces (450 g).
Silk from the Black Widow spider was used by the US military in its WW2 bomb sights.
The other question should be:
"Who of the richest folks pays the most tax?"
You need to convert your integer into a string, iterate the string and sum up the string's numeric characters as integers.
If n is your integer, then str(n) is the string.
If c is the string's numeric character, then int(c) is its numeric/integer value.
Use a for loop to iterate the string.
Your error is most likely here:
finalval = finalval + newlist(i2)
you probably mean:
finalval = finalval + newlist[i2]
Also check the other list indexes. () would be a call, [] is used for indexed list element.
It also would help to be a bit more specific in your thread title.
Take a look at this Tkinter GUI Builder:
http://spectcl.sourceforge.net/spectcl.html
I downloaded the Windows exe file and it works quite well. The target lanuages of the produced code are TCL, Java, HTML, Perl or Python. As with most builders the code is a little wordy, but it works!
You major problem is that __init__() uses double underlines prefix and postfix.
Also, remember that the module name and its file name are case sensitive!
Here is an example:
# save module as tank.py (file name is case sensitive!)
class Tank (object):
def __init__(self, name):
self.name = name
self.alive = True
self.ammo = 5
self.armor = 60
# test the module
if __name__ == '__main__':
mytank = Tank("Bob")
print mytank.name, mytank.armor # Bob 60
Your program should import the modules like this:
# module was saved as tank.py (case sensitive)
import tank
mytank = tank.Tank("Bob")
print mytank.name # Bob
Please make your thread title more specific, instead of "Python Problem" use "Problem with Python Class"
Kung pao chicken is the most commonly ordered Chinese food dish in America.
we use stills then cask it
i like
scotch
irish
americanin that order
I thought you were much too young to drink alcohol.
St Louis began a mass transit rail system about 10 years ago and was an immediate hit. The trains are always full and there is a train going by each rail station every 15 minutes. When there is a baseball game at the down-town St Louis Cardinals Bush statium (no relation to our president) there is a train every 5 minutes. And the city continues to expand the system every few years with the overwhelming taxpayer support.
And its inexpensive too. The last time I rode it I could go anywhere I wanted for only $1.50USD. The St Louis airport is about an hour's drive from my home. Now I just drive to the nearest station's free paring lot, about 10 minutes away, and take the train.
And environmentally safe I think (electric engines).
You are correct AD. Many American cities were developed around transportation with private cars. They will have the hardest time to switch to mass transit.
Another major problem with mass transit is a worker strike, as has happened in many cities and countries here and abroad. Downright criminal, and really cuts into your life style and income.
If lithium ion batteries ever succeed to overcome production problems with larger units, reliability and cost, they will be great for private electric cars. The present nickel hydride batteries used in hybrids are too heavy to run the car alone.
He who has learned to command, knows how to obey.
He knows nothing; and he thinks he knows everything. That points clearly to a political career.
~~~ George Bernard Shaw
You can use the local variable dictionary vars() to create new variables on the fly:
food = 'bread'
vars()[food] = 123
print bread # --> 123
Print vars() after line 1 and 2 to follow what's happening.
Probably the easiest way to do this is to use the local variable dictionary vars() to create new variables on the fly:
food = 'bread'
vars()[food] = 123
print bread # --> 123
You can print out vars() to see what's going on.
Your code is loaded with errors. I assume this is something like you want, it actually works:
import Tkinter as tk
import time
def generate():
for i in range(0,100,5):
time.sleep(0.3)
canvas.create_oval(200-i, 300-i, 210+i, 310+i)
# needed after time.sleep
canvas.update()
# for testing only
print i
canvas.create_oval(200, 300, 210, 310, fill='red')
frame = tk.Frame()
frame.pack()
canvas = tk.Canvas(frame, bg='white', width=500, height=500)
canvas.pack()
button = tk.Button(frame, fg="blue", text="GENERATE", command=generate)
button.pack()
frame.mainloop()
The most dangerous thing about Obama picking Hillary for a running mate would be that her husband Bill would get unlimited access to the White House to check out the interns again.
Hollywood is a place where they'll pay you a thousand dollars for a kiss and fifty cents for your soul.
~~~ Marilyn Monroe
Always forgive your enemies - nothing annoys them so much.
~~~ Oscar Wilde
>> the royal family suck, but the queen is ok
The royal family is probably (and I don't mean this offensively, just stating facts), the most inbred family in the UK.
...
If you would know the secret sex life of the royal family, you would drop this claim!
A comparison of educational institutions (universities) around the works shows USA far ahead of any other nation including UK. The top 100 universities in the world contains Harvard (USA) in the #1 spot and Cambridge (UK) in #2 spot. USA has 37 universities in the top 100, while UK has 13 (if I counted correctly).
US football vs UK football -- UK wins.
Per capita the Brits have 0.21 universities per million and the Yanks only have 0.12 universities per million inhabitants in the top 100.
Also, the Brits have a Queen and we have nothing!
China just annonced that it will spend $30 billion to connect Beijing with Shanghai via a maglev bullet train that can travel at speeds of up to 300 mph, cutting the travel time between the two cities in half.
They already have a maglev bullet train that connects Shanghai with its airport (20 miles).
Okay guys, time to take a cold shower.
Never heard of Jay Severin, honestly! Are you living in the Bible belt or something?
I prefer BBC to most American channels/stations because they tell you the unbiased news and not just the government line. Our public radio stations carry BBC news at night and you can also get it with short wave.
With what, thier own similarly-bulging 'death carrot' munitions?
Oh, I think one of the standard issue laser guided 2000 pounders will do a good job on most any kitchen. It has been used very successfully on Canadian soldiers in Afghanistan, and they weren't even in a kitchen.
The expert projection for 2010 is $150/barrel for crude oil, mostly due to the sinking value of the US Dollar and increased demand from China and India. So the Brits are sitting on something valuable with their large North Sea oil reserves.
In the US there are large amounts of people without any Healthcare. The hospitals are required to treat them. The bill is passed on to the rest of the paying public. So, in a sense there is a goofy sort of universal healthcare. You might call it conservative (pittance to the poor) healthcare.
Wow, 0.0000003mg per kg of body mass. That makes a bulging can of green beans a weapon of mass destruction! You have one of those and the US Air Force will come and bomb your kitchen!
...
btw i find tall girls with glasses, brown hair and curves amazingly sexy
I am agreeing with you there. I love girls that know how to walk attractively and are not too shy about it.
Hey Lardmeister, you must be pulling As in your Science/Python classes. Nice clean code.
With James Bond the Brits have a leg up 'gainst the Yanks. Also, let's not forget the legendary Benny Hill.
However when it comes to wars, the Yanks have beat the Brits by a mile.
I will try my luck later with a dinner of sweet potato fries and vegetarian hamburger.
do you guys prefer whisky or irish whiskey?
What might be the difference? A popular legend is that St. Patrick introduced distillation to Ireland and later Britain. In Ireland the product was called "uisce beatha" meaning "Water of Life".