Awesome. Thank you! the 0.2.0 beta works. I appreciate the help.
I am glad it works now. Where did you download the new beta version from?
Awesome. Thank you! the 0.2.0 beta works. I appreciate the help.
I am glad it works now. Where did you download the new beta version from?
Dont you have road tax?
The fuel tax is the road tax!
Damn those nasty popup advertisements! They make DaniWeb almost unusable!
Over the next 15 years, India is expected to add another 300 million people to its current population of one billion. That's the equivalent of adding the entire current population of the United States!
Peace on earth for 24 hours. Very unlikely though!
If you know you are stupid, then you are not quite as stupid as you thought.
He knows nothing; and he thinks he knows everything. That points clearly to a political career.
-- George Bernard Shaw
Interested in gasp?
See the post at:
http://www.daniweb.com/forums/post606877-137.html
Also take a look at the post from vegaseat on pygame just above that one.
Note: The missing function set_speed() sounds like something that would use pygame's clock() function. I heard the newer vesion 0.2.0 of gasp has incorporated clock().
The module gasp is a wrapper for pygame with a limited functionality. It is meant for beginners' game development and basic drawing:
# using module gasp to draw an arc, a box, plots and circles
#
# info: GASP (Graphics API for Students of Python)
# A library built on pygame that enables absolute beginners to
# write 1980's style arcade games as an introduction to python.
#
# free download from:
# http://dev.laptop.org/pub/gasp/releases/SOURCES/python-gasp-0.1.1.tar.bz2
# unpack python-gasp-0.1.1.tar.bz2 and copy the 'gasp' subdirectory
# into your python path eg. C:\Python25\lib\site-packages\gasp
from gasp import *
# rgb color tuples
black = 0, 0, 0
blue = 0, 0, 255
brown = 165, 42, 42
green = 0, 255, 0
orange = 255, 165, 0
red = 255, 0, 0
white = 255, 255, 255
yellow = 255, 255, 0
begin_graphics()
t = Text("Huston, we have a problem!", (100,420), color=blue, size=40)
# Line(from (x, Y), to (x, y))
q1 = Line((30, 400), (500, 400), color=black)
q2 = Line((30, 395), (500, 395), color=yellow)
q3 = Line((30, 390), (500, 390), color=black)
# Arc(center (x, y), radius, degrees_start, degrees_end)
# degrees relative to x axis (horizontal)
a = Arc((100,200), 100, 30, 330, filled=True, color=red)
# Box(lower_left_corner (x, y), width, height)
b1 = Box((100, 100), 200, 200, color=blue, thickness=5)
b2 = Box((10, 50), 500, 20, filled=True, color=brown)
# Circle(center (x, y), radius)
c1 = Circle((420,200), 100, filled=True, color=green)
c2 = Circle((420,200), 120, color=orange, thickness=5)
# Plot(center (x, y)) a filled rectangle of given size …
There are other functions missing too, like update_when(). Where did you get the code sample from? Maybe you have an outdated version of gasp.
To find all functions/methods in a module like gasp use:
import gasp
print "List the functions within module gasp:"
for f in dir(gasp):
print f
Look at the output, maybe it's just a minor spelling difference.
Info:
GASP (Graphics API for Students of Python) is a library built on pygame that enables absolute beginners to write 1980's style arcade games as an introduction to python
Some of the more irresponsible politicians here want to remove the federal tax on gasoline and diesel. This tax is solely used to maintain roads and bridges.
The money needed to maintain roads and bridges will be put on the government's credit card, for children and grandchildren to pay. All this to get votes from the many ignorant voters. Would you do that to your own offspring?
White Oak trees hold their leaves the longest of all deciduous plants.
CSV files are generated by spread sheet programs. Rows make a line in the file and the data columns are separated by commas. Python has a module called csv that makes processing this type of file much easier. Check the Python manual.
Part of the Windows Registry is/was ROT13 encrypted. ROT26 anyone?
Parents should be given only a modest and sensible allowance. And they should be encouraged to save up for things. This builds character. It also helps pay for the funeral.
-- P. J. O'Rourke
Hillary Clinton is trying to polarize the US along gender lines, the Iron Lady never did that. Old ladies are Hillary's major support.
In other words, the present CPI would simply assume that if the price of milk goes up like it has recently, the consumer would then drink water instead. Why even bother with a Consumer Price Index?
I think the CPI numbers are used to adjust workers annual wage increases.
Believing in Angels and Ghosts is very popular in the USA. Are these just local phenomena, or do other countries suffer from that?
Smart move on Microsoft's part. Look how the price of Yahhoo tumbled, and the speculators that thought this was a done deal lost big. MS can repeat that a few times and bring Yahoo stock down to the $5 range. Now they have a more realistic price!
Yes it does. Back up your data to CD/DVD just in case. While there would be definite damage, most critical services have a contingency plan and/or computers that are shielded. Multi-national companies have backup data all over the planet. I think some of this comes from the James Bond film where the villan cracked the Bank of England's computer and was going to electronically transfer the assets and then use an EMP bomb to wipe out the bank's records. Well what happens if he succeeds? Does he drive up to the bank with 100 trucks (excuse me lorries) and say "This computer says I own all of your assets so start loading". The bankers would quietly call the nice men in the white coats. There would be damage, but probably not catastrophic chaos IMHO.
Maybe paper and pencil for recording data is not that old fashioned.
There is too much brutality and suffering on this earth to imagine a "Loving God" looking down on this mess, and not helping to straighten things out.
Beer is living proof that God loves us and wants us to be happy.
-- Benjamin Franklin
My fridge is running on empty, all I could find was two hard boiled eggs, so I made an egg salad sandwich.
Childproof scissors work, only two cases of injuries resulting from a child running with scissors were reported last year in the US.
Oh no!
I could not think of anything funny either... Does that make me a Republican?
Yes, you are doomed to be a Republican!
Another sign:
All your wealth is in the bank and not upstairs.
Or maybe a dozen EMPs? Naw.
But it does make for occasional interesting reading.
I don't believe in EMPs. It's just another scare story. Why would the US and Russia have over 10,000 nuclear warheads if just a few would do?
Back to the thread's title. Whomever we elect will have the power to use most of these babies at the press of a button. Maybe it would be wise not to elect some senile old geezer or a selfdelutional ex first lady.
I have an aunt that religiously watches the many church channels on American TV. She donates half her meager pension to these TVangelists. She believes that she will get a spot in Heaven that way. It's her belief, and I am not going to argue with her.
If what young jbennet's believes upsets you, you are not much of a believer in your own belief. Let's discuss this after your exams, please.
Your brain needs oxygen to work well, breath deep during your long exams.
Man: "God, why did you make woman so beautiful?"
God: "So you would love her."
Man: "But God, why did you make her so dumb?"
God: "So she would love you."
Why don't they put pictures of criminals on postage stamps rather than the walls of the post office?
If 'FedEx' and 'UPS' were to merge, would they call it 'Fed UP'?
Are prisons part of infrastructure? California needs lots more prisons!
The deeper that sorrow carves into your being, the more joy you can contain.
-- Irish Proverb
Danger 1 million Ohms!
Something like this might do it:
import random
def dela(x):
sum=0
mylist = []
while sum < x:
b = random.randrange (1, x - sum + 1)
mylist.append(b)
sum = sum + b
#print b,
return sum, mylist
# test it ...
sum, mylist = dela(5)
print mylist # eg. [2, 1, 1, 1]
Time is God's way of keeping everything from happening at once.
(Jewish Proverb)
A recent nationwide study found that Macintosh users most often own Honda and Toyota brand cars, while PC users most often own Ford and Chevrolet.
Usually it's from a class that has an overloaded __call_() in it.
If you set year=0 and then use range(year+1), you only go once through your loop.
There are many more visitors that never register.
I don't think the Dutch were ever in Vietnam.
This is from my super Republican Uncle:
In Dick Chainy's America we would only have two TV channels. Channel One would be Fox News, and on Channel Two he would personally appear and tell you to quickly return the Channel One!
Laughing at your own mistakes can lengthen your own life. Laughing at someone else's can shorten it.
A young woman visits her parents and brings her new fiance to meet them. After an elaborate dinner, the mother tells her husband to find out about the young man.
The father invites the young man to his library for a drink. "So what are your plans?" The father asks the young man.
"I am a Torah scholar." He says.
"A Torah scholar, hmmm," the father says. "Admirable, but what will you do to provide a nice house for my daughter to live in, as she is accustomed to?"
"I will study," the young man said, "and God will provide for us."
"And children?" asks the father. "How will you support children?"
"Don't worry, sir, God will provide," replies the fiance.
The conversation continues like this, and each time the father questions, the young idealist insist that God will provide.
Later, the mother asks her husband, "How did it go, Honey?"
The father answers, "He has no job and no plans, but the good news is that he thinks I'm God."
I already had my nice hot mug of Peruvian coffee, now I am munching on jalapeno Pringles and blue cheese roasted pecan dip.
I not only use all the brain I have, but also all that I can borrow.
Did you see vegaseat's post in "Starting Python" about using module pyglet to sound off a series of wave files?
See: http://www.daniweb.com/forums/post590403-133.html