sneekula 969 Nearly a Posting Maven

This old horse of homework has come up a fair number of times here. Maybe you ought to search for it. Don't forget to use code tags so we can actually read what you are doing so far.

sneekula 969 Nearly a Posting Maven

Oh sweet Jesus! Years ago they used to pester us with stuff like this. C syntax can be real ugly, and your example is one of the best examples of ugly C syntax.

tyincali commented: I concur +1
sneekula 969 Nearly a Posting Maven

I use DrPython. You can download quite a number of plugins for it. It works on Windows and Linux, and was originally written by a teacher of Python. It's easy to switch between editor, shell and output windows. It also handles the input() or raw_input() function well.

sneekula 969 Nearly a Posting Maven

Death Causes Loneliness, Feeling Of Isolation

Hospitals Are Sued By 7 Foot Doctors

Local High School Dropouts Cut In Half

Nicaragua Sets Goal To Wipe Out Literacy

Stud Tires Out

Teacher Strikes Idle Kids

Ban On Soliciting Dead In Ogden

sneekula 969 Nearly a Posting Maven

McCains last stand?

sneekula 969 Nearly a Posting Maven

On top of spaghetti all covered with cheese I had my three meatballs ...

sneekula 969 Nearly a Posting Maven

Just imagining.

God bless you Dave, but maybe you should buy a book on humor.

sneekula 969 Nearly a Posting Maven

A stumble may prevent a fall!

sneekula 969 Nearly a Posting Maven

Beauty without grace is like a hook without bait.

sneekula 969 Nearly a Posting Maven

Every path has its puddle.

sneekula 969 Nearly a Posting Maven

I like these typically British qoutes:

Silence is golden, but the squeaky wheel gets the grease.

The pen is mightier than the sword, but actions speak louder than words.

Wise men think alike, and fools seldom differ.

Doubt is the beginning of wisdom, however faith will move mountains.

Clothes make the man, as long as you never judge a book by its cover.

Good things come in small packages, but remember the bigger the better.

sneekula 969 Nearly a Posting Maven

Nice collection williamhemsworth!

Laura and I thank them from the bottom of my heart.

sneekula 969 Nearly a Posting Maven

The latest desparate allegation:
Obama is a Marxist!
It is getting more irrational by the minute!

sneekula 969 Nearly a Posting Maven

When in doubt run a simplified test code:

# test Tkinter Entry

import Tkinter as tk

def question5(event):
    if entry1.get().lower() in ["samus", "metroid", "prime", "metroid prime"]:
        label2['text'] = "Its the amazing Metroid game heroine Samus, good call!"
    else:
        label2['text'] = "Sigh.. try again."
            
root = tk.Tk()

# first entry with label
label1 = tk.Label(root, text='Enter heroine:')
label1.grid(row=0, column=0)
entry1 = tk.Entry(root, bg='yellow', width=50)
entry1.grid(row=1, column=0, padx=5)
label2 = tk.Label(root, text=' ', fg='red')
label2.grid(row=2, column=0, pady=5)

# start cursor in enter1
entry1.focus()
# value has been entered in enter1 now press return key to check content
entry1.bind('<Return>', question5)

root.mainloop()
sneekula 969 Nearly a Posting Maven

This is the mask I am going to wear:

sneekula 969 Nearly a Posting Maven

A bit of an introvert, you like the special occasions just as much as everyone else. You just have your own unique way of celebrating Halloween.

You are an overachiever and quite popular. You'd save the world if you could.

Your inner child is open minded, playful, and adventurous.

Your fears are irrational and varied. It's hard to predict what you may be afraid of on any given day.

You're prone to be quite emotional and over dramatic. Deep down, you enjoy being scared out of your mind... even if you don't admit it.

You are a traditionalist with most aspects of your life. You like your Halloween costume to be basic, well made, and conventional enough to wear another year.

sneekula 969 Nearly a Posting Maven

why it means sex as in gender

Then use gender.

sneekula 969 Nearly a Posting Maven

Let's not forget that the reason you go hunting is not to solely practice gun safety, but to kill some animal, bring home the bloody dead thing and eat it. That would be the reality.

God bless father and son.

sneekula 969 Nearly a Posting Maven

As long as there are tests, there will be prayer in public schools.

See, we don't need it forced upon us by our conservative government!

Let's add another one of W's (George W. Bush) famous quotes:
"I will have a foreign-handed foreign policy."

sneekula 969 Nearly a Posting Maven

You could have spelled it seggs, this way fewer cons get offended.

sneekula 969 Nearly a Posting Maven

The average American has 13 credit cards. I have 2 which means you must have 24 of them.

sneekula 969 Nearly a Posting Maven

Is your money safe, or is it in a bank?

sneekula 969 Nearly a Posting Maven

For a simple BOA test program using a frame and a dialog see:
http://www.daniweb.com/forums/post722453-3.html

You can use other IDE's to create wxPython programs, but they won't necessarily have drag and drop builders. The builder just creates your widget base, you have to learn where to add your own code to make it all work. If you edit in the wrong places to add your code, the designer may balk at opening the code for further widget additions.

sneekula 969 Nearly a Posting Maven

Okay, I used the BOA constructor IDE to create two files. One file Frame1.py contains the meat:

#Boa:Frame:Frame1
# saved as Frame1.py

import wx
# user added
# Dialog1.py was separately created with New
import Dialog1

def create(parent):
    return Frame1(parent)

[wxID_FRAME1, wxID_FRAME1BUTTON1, wxID_FRAME1PANEL1, 
] = [wx.NewId() for _init_ctrls in range(3)]

class Frame1(wx.Frame):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt,
              pos=wx.Point(331, 157), size=wx.Size(400, 489),
              style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
        self.SetClientSize(wx.Size(392, 455))

        self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self,
              pos=wx.Point(56, 72), size=wx.Size(200, 100),
              style=wx.TAB_TRAVERSAL)

        self.button1 = wx.Button(id=wxID_FRAME1BUTTON1, label='button1',
              name='button1', parent=self.panel1, pos=wx.Point(56, 32),
              size=wx.Size(75, 23), style=0)
        self.button1.Bind(wx.EVT_BUTTON, self.OnButton1Button,
              id=wxID_FRAME1BUTTON1)

    def __init__(self, parent):
        self._init_ctrls(parent)

    def OnButton1Button(self, event):
        # user added
        dlg = Dialog1.Dialog1(self)
        dlg.ShowModal()
        dlg.Destroy()
        
        event.Skip()


# added this via Edit/Add module runner
# much easier to test things this way
if __name__ == '__main__':
    app = wx.PySimpleApp()
    frame = create(None)
    frame.Show()

    app.MainLoop()

Then I created a separate file called Dialog1.py that I can import into the Frame.py:

#Boa:Dialog:Dialog1
# saved as Dialog1.py

import wx

def create(parent):
    return Dialog1(parent)

[wxID_DIALOG1] = [wx.NewId() for _init_ctrls in range(1)]

class Dialog1(wx.Dialog):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Dialog.__init__(self, id=wxID_DIALOG1, name='', parent=prnt,
              pos=wx.Point(339, 154), size=wx.Size(400, 489),
              style=wx.DEFAULT_DIALOG_STYLE, title='Dialog1')
        self.SetClientSize(wx.Size(392, 455))
        self.SetBackgroundColour(wx.Colour(255, 255, 0))

    def __init__(self, parent):
        self._init_ctrls(parent)

The whole thing works just fine. When in doubt, do some simple stuff to test things out.

sneekula 969 Nearly a Posting Maven

I do coding for my science projects.

sneekula 969 Nearly a Posting Maven

McCain on Meet the Press:
"Palin is qualified to be President because she’s married to an oil facilities worker."

sneekula 969 Nearly a Posting Maven

Thanks for making me laugh!

sneekula 969 Nearly a Posting Maven

What kind of girl is a wombat?

sneekula 969 Nearly a Posting Maven

Eureka, I have reached my number 666 post at glorious Daniweb!

It's exactly 666 now, but will of course increase as I post more!

Party time!!!

Maybe we will turn you into an Obama Girl yet! Keep posting!

sneekula 969 Nearly a Posting Maven

cant wait until 66,666 lol

You are almost there!

~s.o.s~ commented: Like they all say; LOL :-) +23
sneekula 969 Nearly a Posting Maven

A calculator to calculate your potential tax cut under the Obama plan:
http://taxcut.barackobama.com/?agi=20000

sneekula 969 Nearly a Posting Maven

:) play nice now..

Thank you!

sneekula 969 Nearly a Posting Maven

Palin costumes weren't in demand until actress Tina Fey famously caricatured her on Saturday Night Live. Now they are all sold out! Folks in the know say she is scarier than the old man.

sneekula 969 Nearly a Posting Maven

Rumor has it that Sarah Palin will donate her 150000 Dollar high class wardrope to the Wasilla City Mission, so that the poor of Wasilla can stay warm in the cold Alaskan winter.

sneekula 969 Nearly a Posting Maven

Between two evils, I always pick the one I never tried before.

sneekula 969 Nearly a Posting Maven

Judging by your comments, you wouldn't recognize truth even if it hit you in the head with the mass and consistency of a standard construction 2X4 piece of lumber.
....

That kind of rude and threadening language does not belong here. This is a nice forum with open minded people!

Just because McCain is going to lose the election in a landslide doesn't mean you have to get huffy!

sneekula 969 Nearly a Posting Maven

"Keep this figure in mind when people claim that the $150,000 the RNC spent on Sarah Palin’s wardrobe represents some kind of frivolity. At least she’s going to wear the clothes more than once, and it may raise some decent funds for charity at the end of the campaign. The Democrats spent an additional $5.3 million on the Barackopolis at Invesco Field, after spending over $14 million to outfit the Pepsi Center."

What was the question?

Dave Sinkula commented: I know you're pretending to play dumb, just don't overdo it. -3
sneekula 969 Nearly a Posting Maven

Bannocks with cheese, cup of Irish tea.

Bannocks are barley-flour biscuits baked on a gridle, yum yum.

sneekula 969 Nearly a Posting Maven

I am not from Scotland, but would love to be!

Nice pictures ....
http://www.visitscotland.com/

sneekula 969 Nearly a Posting Maven

The truth is ....
Obama is scaring McCain!

sneekula 969 Nearly a Posting Maven

Spread the wealth (McCain style)...

sneekula 969 Nearly a Posting Maven

Don't steal, the government does not like competition.

sneekula 969 Nearly a Posting Maven

Lost time is never found again.

sneekula 969 Nearly a Posting Maven

I only give out last year's candy. You can buy it real cheap right after Halloween is over.

sneekula 969 Nearly a Posting Maven

Hahahahahahahaha, you should be a comedian!

I am too young to vote, but I enjoy the preliminaries.

Here are some things the Republicans came up with to smear Obama:

Obama is black!
Well, he is half white. Is his right side black and his left side white or is the other way around?

Obama is a Muslim!
No, but so what?

Obama kills unborn children!
Why don't you lock him up in Sing Sing Prison?

Obama is a terrorist!
Why don't you lock him up in Guantanamo Torture Camp?

Obama is not one of us!
No UFO sightings have been reported lately!

Obama is a socialist!
McCain just supported the biggest giveaway of tax money in US history!

Obama is a communist!
Can't be! I have never seen him at the meetings!

Obama fathered two black children in wedlock!
Now you caught him red handed!

You forgot one:
Obama is a Liberal!
According to one of the goofball female representatives from Minnesota all Liberals are anti-American!

http://blogs.citypages.com/blotter/2008/10/michele_bachman_7.php

sneekula 969 Nearly a Posting Maven

Okay here is some republican humor.

The reason George bush always messes up so much when he's talking is because he's a re"pub"lican and hanged out at the pub to much.

George Bush hasn't touched alcohol for many many years, but he has a real talent uttering gems like this:
"I would have to ask the questioner. I haven't had a chance to ask the questioners the question they've been questioning. On the other hand, I firmly believe she'll be a fine secretary of labor. And I've got confidence in Linda Chavez. She is a -- she'll bring an interesting perspective to the Labor Department."

God bless his unique brand of humour! The English language has grown richer because of him!

sneekula 969 Nearly a Posting Maven

John McCain had another of his senior moments during a rally in Western Pennsylvania:
"My opponent's supporters said some nasty things about Western Pennsylvania!"
The fired up crowd boos against the opponent's supporters. McCain goes on:
"I agree fully with them!"
Dead silence in the crowd. McCain realizes something he said was wrong, so he tries to correct it, but fails:
"I disagree with you!"
Not much applause from the partisan crowd. A few more tries and he finally manages to correct his mistake.

As seen on MSNBC TV.

sneekula 969 Nearly a Posting Maven

Minsk Chocolate Chip Pie

sneekula 969 Nearly a Posting Maven

Dave, now that is funny, because it is the thruth.

More Republican (socialism for the rich) humor:
http://www.vgg.com/kfc/index.html

Closer to home:
This perk is one that kicks into high gear toward the end of any administration, the painting of official portraits at taxpayers' expense. What you may not know is that this little perk isn't reserved for presidents, cabinet (any) members get them too. Wouldn't you like John D. Ashcroft, Richard Bruce "Dick" Cheney , Donald H. Rumsfeld or Alberto Gonzales smile down on you? Order now!

sneekula 969 Nearly a Posting Maven

Very nice find there vmanes!

I am mostly into to high level programming, so I must be a bloody liberated programmer.

I wonder how Mr. Spock would program?