[Tutor] program still doesnt work

Udz thinkuknowme2007 at yahoo.com
Fri Dec 5 18:19:26 EST 2003


hey,
 
well, when i just click on the original .py file, the python command line window pops up, then an application error:
 
The instruction at "0x77fc9e82" referenced memory at "ox2049202c". The memory could not be "written". 
Click on OK to terminate the program
Click on CANCEL to debug the program
 
But if i click on the .pyc fleThis is wierd, because when i first started this program, i tried clicking on that file to see what would happen, and it came up in python command line just fine. i dont know what the problem is now. As Danny Yoo asked, i'll put up my code and my distutils script. I have to warn you though, this is not an advanced prgram, it basically does nothing. A friend was asking if she could see some of the writing pieces i've written (I write a lot), and i thought i would do it in a creative way. My goal is to make a little archive in which my friends can view my pieces. the program is not nearly finished. I just made the first part of it, which was to make sure the person knew me and to make them laugh a little as well. The program will ask you some questions, and you must answer accordingly. it's sorta stupid really. first of all, follow the simple instructions at the beggining, or this program will be a pain in the ass. It will ask your name, simply for
 retrieval purposes (i wanted to make the prgram a little more lifelike, and one way would be to address the user personally). It will ask you "You know what?", just answer "what?" it'll ask you that again. type what again. when it types it for the third time, u can either type "what" again, or type "shut up". (u wont get it, it's an inside joke). When it asks for my name, you can type in "Udz". When it asks for my birthday, type in 09/04/89. When it asks what 2 things I do best, put in "Computers, Writing". it will ask you to confirm your name. If you want, you can change what you typed earlier at this point. Thats as far as I have gotten. I was going to stat pasting essays and poems and stuff like that in, but i decided to try the py2exe because one of my friends wanted to see how far i had gotten. so here's the code:
 
# -*- coding: cp1252 -*-
def MultiLines ():
    print
    print
    print

print ">>>>>>>>>>>>>>>>>>>WHAT I DID WITH MY FREE TIME<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
print "Well, basicallly, I got bored, and started writing this program. Yeah, I'm a"
print "dork, but hey, the only other thing to do was hw, and that would just be"
print "retarded. But I warn you; you have to know me very well to be able to listen to what i have to say in this program. So Goof and Peanut Butter, you're already"
print "out. Actually,most people are. Actually, besides family, only 2 people get to do"
print "this...kinda sad, but oh well. This starting off dialouge was just to provide  "
print "information about the program. The first rule: NEVER use any quotations like"
print "commas, quotes, and ESPECIALLY exclamation marks. You can use question marks"
print "when appropriate, I have programmed those in. Oh yeah, and no periods either, "
print "those would just be a pain in the ass to program in.Also, I'll be talking to you"
print "a lot through this program, so you can expect a crapload of questions. I will ask some random questions and some important ones. If you dont know which "
print "questions to answer, notice that every question that i want you to answer is on a seperate line. Oh yeah, when you're answering a question, make sure that you"
print "hit Enter before replying, or you'll have to type your answer all over again."
print "Don't complain afterwards, I'v given you fair warning."
def understand ():
    name = raw_input ("OK? type 'OK' if you understand my directions, and type 'I'm an idiot' if you don't understand.")
    input = raw_input ()
    if input == "OK" or input == "ok" or input == "Ok":
        print "Good, now I know you can read!"
    elif input == "I'm an idiot":
        print "Well, duh, if you couldn't follow those instructions, you really are an idiot. Here, read it again:"
        print "Well, basicallly, I got bored, and started writing this program. Yeah, I'm a"
        print "dork, but hey, the only other thing to do was hw, and that would just be"
        print "retarded. But I warn you; you have to know me very well to be able to listen to what i have to say in this program. So Goof and Peanut Butter, you're already"
        print "out. Actually,most people are. Actually, besides family, only 2 people get to do"
        print "this...kinda sad, but oh well. This starting off dialouge was just to provide  "
        print "information about the program. The first rule: NEVER use any quotations like"
        print "commas, quotes, and ESPECIALLY exclamation marks. You can use question marks"
        print "when appropriate, I have programmed those in. Oh yeah, and no periods either, "
        print "those would just be a pain in the ass to program in.Also, I'll be talking to you"
        print "a lot through this program, so you can expect a crapload of questions. I will ask some random questions and some important ones. If you dont know which "
        print "questions to answer, notice that every question that i want you to answer is on a seperate line. Oh yeah, when you're answering a question, make sure that you"
        print "hit Enter before replying, or you'll have to type your answer all over again."
        print "Don't complain afterwards, I'v given you fair warning."
        understand ()
    else:
        print "[Sigh] How stupid can you people get? You can't even read. I'll ask you again."
        print "Well, basicallly, I got bored, and started writing this program. Yeah, I'm a"
        print "dork, but hey, the only other thing to do was hw, and that would just be"
        print "retarded. But I warn you; you have to know me very well to be able to listen to what i have to say in this program. So Goof and Peanut Butter, you're already"
        print "out. Actually,most people are. Actually, besides family, only 2 people get to do"
        print "this...kinda sad, but oh well. This starting off dialouge was just to provide  "
        print "information about the program. The first rule: NEVER use any quotations like"
        print "commas, quotes, and ESPECIALLY exclamation marks. You can use question marks"
        print "when appropriate, I have programmed those in. Oh yeah, and no periods either, "
        print "those would just be a pain in the ass to program in.Also, I'll be talking to you"
        print "a lot through this program, so you can expect a crapload of questions. I will ask some random questions and some important ones. If you dont know which "
        print "questions to answer, notice that every question that i want you to answer is on a seperate line. Oh yeah, when you're answering a question, make sure that you"
        print "hit Enter before replying, or you'll have to type your answer all over again."
        print "Don't complain afterwards, I'v given you fair warning."
        understand ()
understand ()
print
print
print
print
print
print "STARTING PROGRAM"
print
name = raw_input ("Press the Enter key twice.")
input = raw_input ()
print "Please Wait........"
name = raw_input ("Enter your Name(Please Capitalize):")
input = raw_input ()
urname = input
print "Please Wait........"
name = raw_input ("--------------Program Ready to Run--------------Press Enter 2 times again.")
input = raw_input ()
def countdown (s):
    if s == ".................................................................................":
        MultiLines ()
    else:
        print s
        countdown (s + ".")
countdown (".")
print "PROGRAM INITIALIZED"
print
print
print "HAVE FUN!!!!"
print
print
print
print "Hey people, what's up? So I guess you were wondering what this thing is, cuz I"
print "never told you,and you were curious, right? yeah, and I was gonna say say "
print "something, but I forgot it, so oh well."
def newLine():
    print
    
def UKW1 ():
    name = raw_input ("You know what?") 
    input = raw_input ()
    if input == "what?" or input == "WHAT?" or input == "What?" or input == "what" or input == "WHAT" or input == "What":                                                                                                                                                                                                                                                                                                            
        print "I'm cold"
    else:
        print "That's the wrong answer!!!!"
        UKW1 ()
UKW1 ()
def UKW2 ():
    name = raw_input ("You know what?")
    input = raw_input ()
    if input == "what?" or input == "WHAT?" or input == "What?" or input == "what" or input == "WHAT":                                                                                                                                                                                                                                                                                                            
        print "I'm still cold"
    else:
        print "That's the wrong answer!!!!"
        UKW2 ()
UKW2 ()
def UKW3 ():
    name = raw_input ("You know what?")
    input = raw_input ()
    if input == "what?" or input == "WHAT?" or input == "What?" or input == "what" or input == "WHAT":                                                                                                                                                                                                                                                                                                            
        print "This is getting retarded, so i won't do it anymore."
    elif input == "shut up" or input == "SHUT UP" or input == "Shut up":
        print "OK, OK I'll shut up....geez, what a temper....you're like Captain 0"
    else:
        print "That's the wrong answer!!!!"
        UKW3 ()
UKW3 ()
print "Well, I guess I'm here because I have a story to tell. At least that's what"
print "I think. And the only story I know is my own. But before I start, I have to make sure youre allowed to read this."
def WhatMyName1 ():
    name = raw_input("Soooo......Whats my name?")
    input = raw_input ()
    if input == "Uddit" or input == "UDDIT" or input == "uddit" or input == "Udz" or input == "UDZ" or input == "udz":
        print "Alright, good job, on to the next question."
    else:
        print "OH MY GOD!!! You don't even know my name, and you were trying to play this game??"
        print "YOU LOSE!!!!!!!"
        closefunction ()
def closefunction ():
    name = raw_input("This window  will not close by itself, you have to hit close yourself. Sorry to all the lazy people out there")
    input = raw_input ()
    if input == None:
        closefunction ()
    else:
        closefunction ()
        
WhatMyName1 ()
def WhatBirthday1 ():
    name = raw_input ("What's my birthday? Answer in mm/dd/yy format.")
    input = raw_input ()
    if input == "09/04/89" or input == "9/4/89":
        print "Wow, maybe you do know me. But then again, maybe not...."
    else:
        print "See, you don't know me. But i understand, you could've just screwed up typing. I'll give you one more chance....."
        WhatBirthday2 ()
def WhatBirthday2 ():
    name = raw_input ("What's my birthday? Answer in mm/dd/yy format.")
    input = raw_input ()
    if input == "09/04/89" or input == "9/4/89":
        print "Wow, maybe you do know me. But then again, maybe not...."
    else:
        print "Sorry, you lost, and if you don't know me, I wouldn't try again. You'll never make it through."
        closefunction ()
WhatBirthday1 ()
def WhatBest1 ():
    name = raw_input ("OK, this is the last question. What do I do best? (answer this in categories like: Math, Writing, Computers. Not specific like: programming, poetry, prose, Algebra. You get the point) Give me 2 categories, written like this: Category1, Category2.")
    input = raw_input ()
    if input == "Music, Computers" or input == "MUSIC, COMPUTERS" or input == "music, computers" or input == "Computers, Music" or input == "COMPUTERS, MUSIC" or input == "computers, music" or input == "Writing, Music" or input == "WRITING, MUSIC" or input == "writing, music" or input == "Music, Writing" or input == "MUSIC, WRITING" or input == "music, writing" or input == "Writing, Computers" or input == "WRITING, COMPUTERS" or input == "writing, computers" or input == "Computers, Writing" or input == "COMPUTERS, WRITING" or input =="computers, writing":
        print "Wow, you are good. If you knew that, you obviously know me well. Nice, now you can experience whatever I wanted you to."
    else:
        print "Sorry, you got that question wrong, but since it's so hard, you have infinte times to get it right. Have fun!!"
        WhatBest2 ()
def WhatBest2 ():
    name = raw_input ("Alright, Last question, you've got infinite tries, good luck. What do I do best? (answer this in categories like: Math, Writing, Computers. Not specific like: programming, poetry, prose, Algebra. You get the point) Give me 2 categories, written like this: Category1, Category2.")
    input = raw_input ()
    if input == "Music, Computers" or input == "MUSIC, COMPUTERS" or input == "music, computers" or input == "Computers, Music" or input == "COMPUTERS, MUSIC" or input == "computers, music" or input == "Writing, Music" or input == "WRITING, MUSIC" or input == "writing, music" or input == "Music, Writing" or input == "MUSIC, WRITING" or input == "music, writing" or input == "Writing, Computers" or input == "WRITING, COMPUTERS" or input == "writing, computers" or input == "Computers, Writing" or input == "COMPUTERS, WRITING" or input =="computers, writing":
        print "Wow, you are good. If you knew that, you obviously know me well. Nice, now you can experience whatever I wanted you to."
    else:
        print "You got it wrong, try again, maybe you'll get it someday, and be able to play my game. If you get annoyed enough, I might just tell you :)."
        WhatBest2 ()
        
WhatBest1 ()

def ConfirmName1 ():
    print "Alright, now that you've gotten past that little hitch(shouldn't have taken that long, you can move on. So it's ", urname, ", right?(Yes or No)"
    name = raw_input ()
    input = raw_input ()
    if input == "Yes" or input == "yes" or input == "YES":
        print "Cool. You can call me Uddit or Houdat or George or Bob, but I think that's it."
    elif input == "No" or input == "no" or input == "NO":
        name = raw_input ("Oh ok, then what's your name? (Capitalize please)")
        input = raw_input ()
        urrealname = input
        ConfirmName2 ()
    else:
        print "Jesus christ, can u follow instructions? I asked you something!!"
        ConfirmName2 ()
    

def ConfirmName2 ():
    print "Alright, let's make sure we didn't screw up. It's ", urrealname, ", right?(Yes or No)"
    name= raw_input ()
    input = raw_input ()
    if input == "Yes" or input == "yes" or input == "YES":
        print "Cool. You can call me Uddit or Houdat or George or Bob, but I think that's it."
    elif input == "No" or input == "no" or input == "NO":
        name = raw_input ("Oh ok, then what's your name? (Capitalize please)")
        input = raw_input ()
        urrealname = input
        ConfirmName2 ()
    else:
        print "Jesus christ, can u follow instructions? I asked you something!!"
        ConfirmName2 ()
ConfirmName1 ()
#Here, I have to Put in the list of things to do. DONT FORGET UDZ!!!!!!!!
 
 

def WhatAboutGod ():
    print "WHAT ABOUT GOD?"
    print " By ME"

print "God. It’s one of the most argued topics in the world at any given time, so I just thought that I’d add my argument to the pool. I think that God can’t really be explained. I myself have had conflicting views over the years. The idea of a God or “superior” being has been around since the beginning of civilization. God is tied to us, and we to him. Instead of easing into the subject or trying to sneak up on it, I’ll just say it right out; I don’t believe that God exists. "
print "There are so many people that are willing to (and already have) argue with me on the subject. I sometimes ask people why they believe in God. Their answers are pretty much all the same. The stupidest I’ve ever gotten is “What do you mean, ‘Why do you believe in God?’ I believe in God because God exists.” That’s actually a common one. Another is, “Why I believe in God? Well, it’s been passed down in my religion for centuries, I have to carry on the belief.” It’s like they don’t have a free mind of their own. They are following their religion. How can you possibly follow a religion if you’re not sure that you even believe in it? The main reason I don’t believe in God is that there is no proof. If anyone can give me solid proof that clearly proves that God exists, I’ll readily believe it myself. But the fact is, no one can provide such proof. Most people in the world just believe because they were taught to do so, or because of religious obligations. I can relate to that. When I
 was little, I used to believe in God. I remember it. I also remember not ever having a reason to do so. I just believed because my parents and grandparents did. I went to religious ceremonies, participated in rituals and the like, but that was only because I was following everyone else; I wasn’t using my own brain to form my own conclusions and my own beliefs. "
print "Of the people that do believe of their own free will, none can really provide any proof. Many will claim that they believe because they experienced a traumatic experience through which God helped them. Others say that they feel clairvoyant vibrations, and can sense/talk to God. But when I ask for proof, there’s no answer. One belief I find most interesting, and even most believable, is the belief that God exists only as an impartial judge of life. Most religions did start out with this belief at first, but then it got buried under the new religions. People came forward saying that they were the messengers of God, and started a new religion. This started occurring throughout the world. But the original idea was different. God is the creator of this world, the creator of life. He created all this, and is now watching us. He doesn’t answer anyone’s prayers, he doesn’t appear at beckoning, and he only steps in to alter things when he sees fit. Of course, I don’t believe this
 theory either, but the belief that God is just an impartial judge makes much more sense than him being an “all-powerful” figure whom we should all respect. Yet some people still see him as an entity that controls people’s lives and destinies. "
print "I totally disagree. It’s impossible to have our lives controlled by another figure. We move with our own wills. We make our own decisions. The outcome of our life isn’t in the hands of a superior being that decides if we’re good human beings or bad. The only person that can decide what you want to be is you, not some guy sitting up in the sky. He can’t “make” our destinies for us; we can change what we want to do at any time. Our decisions could take us anywhere. One day we could be on our way to a high-class university like Yale, the next we could be out in the street smoking pot. It’s our choice, not anyone else’s. To me, God is a legend, that’s it. To you, he could be something much more. We all have our own beliefs, and all we can do is express them."

    
Well, that should give you some trouble. Now here is the distutil script that i wrote:
 
#setup-script
from distutils.core import setup
import py2exe
setup(name = "thing",
      scripts = ["thing.py"],
)
 
small and simple, what i prefer. and in command prompt, this is the command i used to use py2exe:
 
python setup-script.py py2exe
 
well, i think thats it. i hope some one can get back to me with this ting soon, cuz its driving me crazy. have fun all!
thanks in advance,
 
Udz


---------------------------------
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20031205/e6ddd5dc/attachment-0001.html


More information about the Tutor mailing list