Ene Uran 638 Posting Virtuoso

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?

Ene Uran 638 Posting Virtuoso

Dont you have road tax?

The fuel tax is the road tax!

Damn those nasty popup advertisements! They make DaniWeb almost unusable!

Ene Uran 638 Posting Virtuoso

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!

Ene Uran 638 Posting Virtuoso

Peace on earth for 24 hours. Very unlikely though!

Ene Uran 638 Posting Virtuoso

If you know you are stupid, then you are not quite as stupid as you thought.

Ene Uran 638 Posting Virtuoso

I have no time to hurry.

Ene Uran 638 Posting Virtuoso

He knows nothing; and he thinks he knows everything. That points clearly to a political career.
-- George Bernard Shaw

Ene Uran 638 Posting Virtuoso

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().

Ene Uran 638 Posting Virtuoso

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 …
Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

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

Ene Uran 638 Posting Virtuoso

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?

Ene Uran 638 Posting Virtuoso

White Oak trees hold their leaves the longest of all deciduous plants.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

Part of the Windows Registry is/was ROT13 encrypted. ROT26 anyone?

Ene Uran 638 Posting Virtuoso

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

Ene Uran 638 Posting Virtuoso

Hillary Clinton is trying to polarize the US along gender lines, the Iron Lady never did that. Old ladies are Hillary's major support.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

Believing in Angels and Ghosts is very popular in the USA. Are these just local phenomena, or do other countries suffer from that?

Ene Uran 638 Posting Virtuoso

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!

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

Beer is living proof that God loves us and wants us to be happy.
-- Benjamin Franklin

Ene Uran 638 Posting Virtuoso

My fridge is running on empty, all I could find was two hard boiled eggs, so I made an egg salad sandwich.

Ene Uran 638 Posting Virtuoso

Childproof scissors work, only two cases of injuries resulting from a child running with scissors were reported last year in the US.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

Well that documentary, Jericho, got a lot of the states blowed up. How many nukes were there?

Movies in general can dream up a lot of BS. That's entertainment!

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

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."

Ene Uran 638 Posting Virtuoso

Why don't they put pictures of criminals on postage stamps rather than the walls of the post office?

Ene Uran 638 Posting Virtuoso

If 'FedEx' and 'UPS' were to merge, would they call it 'Fed UP'?

Ene Uran 638 Posting Virtuoso

Are prisons part of infrastructure? California needs lots more prisons!

Ene Uran 638 Posting Virtuoso

The deeper that sorrow carves into your being, the more joy you can contain.
-- Irish Proverb

Ene Uran 638 Posting Virtuoso

Danger 1 million Ohms!

Ene Uran 638 Posting Virtuoso

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]
Ene Uran 638 Posting Virtuoso

Time is God's way of keeping everything from happening at once.
(Jewish Proverb)

Ene Uran 638 Posting Virtuoso

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.

Ene Uran 638 Posting Virtuoso

Usually it's from a class that has an overloaded __call_() in it.

Ene Uran 638 Posting Virtuoso

If you set year=0 and then use range(year+1), you only go once through your loop.

Ene Uran 638 Posting Virtuoso

There are many more visitors that never register.

Ene Uran 638 Posting Virtuoso

I love to dance!

Ene Uran 638 Posting Virtuoso

I don't think the Dutch were ever in Vietnam.

Ene Uran 638 Posting Virtuoso

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!

Ene Uran 638 Posting Virtuoso

Laughing at your own mistakes can lengthen your own life. Laughing at someone else's can shorten it.

Ene Uran 638 Posting Virtuoso

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."

Ene Uran 638 Posting Virtuoso

I already had my nice hot mug of Peruvian coffee, now I am munching on jalapeno Pringles and blue cheese roasted pecan dip.

Ene Uran 638 Posting Virtuoso

I not only use all the brain I have, but also all that I can borrow.

Ene Uran 638 Posting Virtuoso

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