Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Danny Yoo
On Sat, 9 Jul 2005, Nathan Pinno wrote: > Also, I just wanted to know because I'm using it in my Giant Computer > program for the menus, so I don't have to keep re-typing them. Hi Nathan, Wait; Nathan, are you using the IDLE Python programming environment to edit your programs? I just want

Re: [Tutor] What's the invalid syntax? [What's the error mesaage?]

2005-07-09 Thread Danny Yoo
On Sat, 9 Jul 2005, Nathan Pinno wrote: > What's the invalid syntax? > > Here's the code (Part of my Guess the Numbers game): > > if a0 == x0 and a1 == x1 and a2 == x2 and a3 == x3: > print "Congratulations! Way to go?" > answer = raw input("Play again: (Y)es or (

[Tutor] Re: Looks like Giant Calc is a bust.

2005-07-09 Thread DogWalker
"Nathan Pinno" <[EMAIL PROTECTED]> said: >Hey all, > >The Giant Calculator runs now, just not as I want it to. I can't seem to get >it past the main menu. Here is the code: > ># This program is designed as a big calculator with functions. > ># This first bunch of code is for the various menus. I

[Tutor] Looks like Giant Calc is a bust.

2005-07-09 Thread Nathan Pinno
Hey all,   The Giant Calculator runs now, just not as I want it to. I can't seem to get it past the main menu. Here is the code:   # This program is designed as a big calculator with functions.   # This first bunch of code is for the various menus. I decided to divide the calculations into sep

[Tutor] What's going on with this code? Error message supplied.

2005-07-09 Thread Nathan Pinno
Here is the error message:   Traceback (most recent call last):  File "D:\GC.py", line 67, in ?    if option == 1:NameError: name 'option' is not defined And the relevant code:   print "The Giant Calculator"printprint "Copyright 2005 Written and debugged by Nathan Pinno"print print main_menu(

Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Nathan Pinno
Brian, I'll do one better and post the code after I'm done writing it. Then you can decide for yourself what I'm trying to do. Nathan P. - Original Message - From: "Brian van den Broek" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Saturday, July

Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Brian van den Broek
Nathan Pinno said unto the world upon 09/07/2005 20:36: > - Original Message - From: "Brian van den Broek" > > > Nathan Pinno said unto the world upon 09/07/2005 19:03: > >> Hi all, > >> > >> Is the subject possible without getting an error? > >> > >> Nathan Pinno > >> Crew, M

Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Nathan Pinno
Also, I just wanted to know because I'm using it in my Giant Computer program for the menus, so I don't have to keep re-typing them. Nathan Pinno - Original Message - From: "Brian van den Broek" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Saturday,

Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Nathan Pinno
Hi all, How do I make Python get a def? Is it the "get" function, or something else? I need to know so that I can get a def for that computer MasterMind(tm) game that I'm writing. BTW, I took your advice, and wrote some definitions for my Giant Calculator program. Might make the code

Re: [Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Brian van den Broek
Nathan Pinno said unto the world upon 09/07/2005 19:03: > Hi all, > > Is the subject possible without getting an error? > > Nathan Pinno > Crew, McDonalds Restaurant, Camrose, AB Canada > http://www.npinnowebsite.ca/ No. Why do you want to do this? If it is to have a function with no arguments:

[Tutor] Can I use def without ( ) at the end?

2005-07-09 Thread Nathan Pinno
Hi all,   Is the subject possible without getting an error?   Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp://www.npinnowebsite.ca/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is it possible to...

2005-07-09 Thread Nathan Pinno
Could you send me the code if possible, or show me the way to go? - Original Message - From: "nephish" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Sent: Saturday, July 09, 2005 12:32 PM Subject: Re: [Tutor] Is it possible to... >i am, with a simple if-then st

Re: [Tutor] What's the invalid syntax?

2005-07-09 Thread ZIYAD A. M. AL-BATLY
On Sat, 2005-07-09 at 14:00 -0600, Nathan Pinno wrote: > What's the invalid syntax? > > Here's the code (Part of my Guess the Numbers game): > > if a0 == x0 and a1 == x1 and a2 == x2 and a3 == x3: > print "Congratulations! Way to go?" > answer = raw input("Play a

[Tutor] What's the invalid syntax?

2005-07-09 Thread Nathan Pinno
What's the invalid syntax?   Here's the code (Part of my Guess the Numbers game):       if a0 == x0 and a1 == x1 and a2 == x2 and a3 == x3:    print "Congratulations! Way to go?"    answer = raw input("Play again: (Y)es or (N)o Type the letter of your choice. ")   Thank

[Tutor] Is it possible to...

2005-07-09 Thread Nathan Pinno
Hi all,   I was just wondering if it is possible to use Python as a language to password protect a webpage? If it is possible, I wouldn't mind learning how, it would enable me to add a member-only section to my website.   Thanks, Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp:/

Re: [Tutor] Passing Arguments

2005-07-09 Thread Alan G
> # Here I just created a couple of variables to print, and then > prt_Name returns g. >def prt_Name(): >g = 'foo' >print g >return g > > def get_Name(b): >print 'f' >print b > > get_Name(prt_Name) So you are passing a function object into your get_Name function. Is that what y

Re: [Tutor] py2exe

2005-07-09 Thread jfouhy
Quoting "D. Hartley" <[EMAIL PROTECTED]>: > I modified the setup.py file to match the details of my game (as best > I can imagine: I don't know what "optimize = 2 #0, > 1, or 2; like -O and -OO" means, so I just left it as his sample had > it, >From python -h: -O : optimize generated byteco

[Tutor] UnicodeDecodeError when copying files with Umlauten

2005-07-09 Thread Severin Kacianka
Hello, I am very new to python programming and totally new to GUI-programming. Now I try to write a GUI for a little script I wrote some time ago, and get a Error I cannot explain. As it may be helpful for you to see the whole scripts I put them both online: The CLI-application (and library):

Re: [Tutor] Passing Arguments

2005-07-09 Thread Max Noel
On Jul 9, 2005, at 11:17, Don Parris wrote: get_Name(prt_Name) # Calling get_Name with prt_Name as the argument produces this: C:\Python24>python scripts\learning.py f At least it found the function. That's little shy of a miracle for me. :) However, I would like to see 'foo' printed out,

[Tutor] Passing Arguments

2005-07-09 Thread Don Parris
For some reason, everytime I think I finally understand the passing arguments thing, I prove that I don't. However, I *am* getting a little closer to getting it. # Here I just created a couple of variables to print, and then prt_Name returns g. def prt_Name(): g = 'foo' a = 'bar' prin

Re: [Tutor] Why does invalid syntax pop up? (fwd)

2005-07-09 Thread Nathan Pinno
Hey all, Just a notice, I'm quitting work on this program, too complicated for me to work out, I'm getting lost now and can't figure out the bugs anymore. I think for know I'll work on my Giant Calculator application, which I'll show the code when it's done. If anyone is interested in finishing i