Re: [Tutor] Copying a mutable

2011-06-07 Thread Nathan
unsubscribe 在 2011-06-08 07:11:33,"Walter Prins" 写道: Hi, 2011/6/7 Válas Péter Hi, let X be a mutable container, such as dict/set/list=bytearray, and Y=X, When I change X, Y will follow it, having always the same value, although id(X)!=id(Y). That's not correct: Python 2.7 (r27:82525, Jul

Re: [Tutor] Floating Point Craziness

2011-06-13 Thread Nathan
who can tell me how to unsubscribe the message. At 2011-06-13 01:13:05,"Steven DAprano" wrote: >Ryan Strunk wrote: >> Hi everyone, >> I'm designing a timeline. When the user presses the right arrow, 0.1 is >> added to the current position. The user can add events to the timeline, and >> can l

[Tutor] Calling Classes From Tkinter Radio Buttons

2012-04-08 Thread Nathan
I'm using Tkinter for a GUI for a program of mine, and I'm trying to use radio buttons to select different functions, but it's not working right at all. Originally, I had something like class ClassOne(self): def ___str___(self): return "This is the base class." class ClassTwo(ClassOn

Re: [Tutor] Python for Absolute Beginners

2012-09-28 Thread Nathan
Which edition do you have? My copy mentions nothing about a companion guide, so my guess is that you don't need it. That said, my copy also doesn't send me to any sites for the exercises. Everything I need is right in the book. On Sep 28, 2012 7:30 AM, "Debbie Snowdon" wrote: > ** > Help! I'm int

[Tutor] Dynamic TKinter widgets?

2012-11-24 Thread Nathan
I'm working on a simple Tarot reading program in Python 2.7, and I'm having a bit of trouble with some GUI abstract. (Sorry, no code in here.) As of right now, all of the logic is working, and I can generate Tarot spreads that tell me, in text, the role of each card "position", and what card is in

Re: [Tutor] Dynamic TKinter widgets?

2012-11-24 Thread Nathan
quot; wrote: > On Saturday 24 November 2012, Nathan wrote: > > I'm working on a simple Tarot reading program in Python 2.7, and I'm > having > > a bit of trouble with some GUI abstract. (Sorry, no code in here.) > > > > As of right now, all of the logic is worki

Re: [Tutor] Dynamic TKinter widgets?

2012-11-25 Thread Nathan
On Nov 25, 2012 6:49 PM, "ALAN GAULD" wrote: > > CC'ing the list... > Oops, my bad. I forget to hit Reply All. >> >> I know you can use images instead of text with Labels, like you can with Buttons. >> The advantage of a Text widget, in this case, is that you can use both in the same widget. >>

Re: [Tutor] Dynamic TKinter widgets?

2012-11-28 Thread Nathan
, "Nathan" wrote: > > On Nov 25, 2012 6:49 PM, "ALAN GAULD" wrote: > > > > CC'ing the list... > > > > Oops, my bad. I forget to hit Reply All. > > >> > >> I know you can use images instead of text with Labels, like you can > w

[Tutor] Simple Python Telnet Client (Help with Asynchronous IO)

2010-08-03 Thread Nathan Farrar
Hello All, I'm attempting to write a simple telnet client. Yes, I've been told that I should be using twisted to do this. I want to learn to do it myself first, so that I can fully understand the concepts - then I will scrap it and switch to using twisted. When I started, I didn't realize there

[Tutor] Scripting-Puzzle Pirates

2010-10-24 Thread Nathan Finney
, Nathan Finney.___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Passing perimeters in dictionary values?

2009-02-24 Thread nathan virgil
I'm experimenting with OOP using the Critter Caretaker script from Python Programming for the Absolute Beginner as my basis. I've noticed that a dictionary/function combo is a great way to handle menus, and so I've adapted the menu to read as: selection = raw_input("Choice: ") choices = {"0":quit

Re: [Tutor] Passing perimeters in dictionary values?

2009-02-24 Thread nathan virgil
m going to go with, anyway. At least until I can learn about lambdas, or even some other solution. On Tue, Feb 24, 2009 at 2:42 PM, Kent Johnson wrote: > On Tue, Feb 24, 2009 at 2:03 PM, nathan virgil > wrote: > > I'm experimenting with OOP using the Critter Caretaker scri

Re: [Tutor] Passing perimeters in dictionary values?

2009-02-24 Thread nathan virgil
On Tue, Feb 24, 2009 at 6:50 PM, Alan Gauld wrote: > > > Or you can build the param value into the dictionary: > > selection = raw_input("Choice: ") > choices = { > "0":(quit, None), > "1":(crit.talk, "Hi there"), > "2":(crit.eat, "Nuts"), > "3": (crit.play, "Soccer") > "4": (crit.play, "Baseball"

Re: [Tutor] Passing perimeters in dictionary values?

2009-02-24 Thread nathan virgil
Erm, it's still not working... Whenever I try to use the talk method (which reports the mood, and doesn't take parameters), it says I gave it too many parameters. Maybe it might help if I posted the code in it's entirety # Critter Caretaker # A virtual pet to care for class Critter(object):

[Tutor] Loop help

2009-08-16 Thread Nathan Wing
first homework assignment. I was successful in problem one, but having a hard time with problem two. Any help would be greatly appreciated! Regards, Nathan Here is the problem: A wealthy donor has given MIT $500,000 to be used to pay the tuition of one student every other year until the money run

[Tutor] Help with pexpect

2009-10-16 Thread Nathan Farrar
'--More--' is encountered (and it this can happen multiple times), I want to send a newline character to the session and continue gathering the output. Thanks for the help! Nathan -- "The presence of those seeking the truth is infinitely to be preferre

[Tutor] Pexpect maxread & searchwindowsize, timeout

2009-10-20 Thread Nathan Farrar
I haven't been able to find any real examples of pexpect usage, nor documentation. Just little bits here and there, so I'm kind of struggling through. I've got the follow bit of code I'm working with: def main(): try: print 'attempting to spawn connection ... ' session = pexp

Re: [Tutor] Pexpect maxread & searchwindowsize, timeout

2009-10-20 Thread Nathan Farrar
tion I can see that pexpect uses a maxread and a searchwindowsize value, but I'm not sure how to use them. Any tips? Thanks again. On Tue, Oct 20, 2009 at 11:26 AM, vince spicer wrote: > > > On Tue, Oct 20, 2009 at 11:11 AM, Nathan Farrar > wrote: >> >> I haven&#

[Tutor] html scrapeing

2005-06-28 Thread Nathan Hughes
Hi, Ive been looking for way to scrape the data from a html table, but dont know even where to start, or how to do.. an example can be found here of the table ( http://www.dragon256.plus.com/timer.html ) - i'd like to extract all the data except for the delete column and then just print each row.

[Tutor] How do I make Python calculate square roots?

2005-07-02 Thread Nathan Pinno
Hi all,Does anyone know how to make Python calculate square roots?   Thanks, Nathan Pinnohttp://www.npinnowebsite.ca/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] How to get 4 numbers from the user in one line for easy comparision?

2005-07-02 Thread Nathan Pinno
incorrect.   If anyone has any advice in how to code this, I will gladly appreciate the help.   Sorry if I seem like a newbie, but I am! :) Nathan Pinnohttp://www.npinnowebsite.ca/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

[Tutor] Is there a way to combine a request for numbers and letters?

2005-07-04 Thread Nathan Pinno
Hi all,   Is there a way to combine a request for numbers and letters (e.g. user id and passwords)?   Thanks, Nathan Pinnohttp://www.npinnowebsite.ca/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is there a way to combine a request for numbers and letters?

2005-07-04 Thread Nathan Pinno
Sorry,   Just remembered that strings can include both letters and numbers. Case closed.   Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp://www.npinnowebsite.ca/ - Original Message - From: Nathan Pinno To: tutor@python.org

[Tutor] What's wrong with this code?

2005-07-04 Thread Nathan Pinno
  print "Login Info"    for x in site.keys():    print "Site: ",x," \tID: ",numbers[x]," \tPassword: ",numbers[x]    print    elif menu_choice == 5:    filename = raw_input("Filename to save: "

Re: [Tutor] What's wrong with this code?

2005-07-06 Thread Nathan Pinno
t;,x," \tID: ",numbers[x]," \tPassword: ",numbers[x] print menu_choice = input("Choose an option: ") elif menu_choice == 5: filename = raw_input("Filename to save: ") save_login(list,filename) menu_choice = input("C

[Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-06 Thread Nathan Pinno
ad a file?   Here's the latest code:   # This is the code for a password protected program to store passwords.password = "hello"print "The Password Program"print "Copyright 2005 Nathan Pinno."printanswer = raw_input("What is the password? ")while passwo

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Nathan Pinno
Thanks Wolfram for help with that error. Here's another that popped up: Traceback (most recent call last): File "D:\password.py", line 68, in ? for x in site.keys(): AttributeError: 'str' object has no attribute 'keys' How t

Re: [Tutor] Why is this error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post.

2005-07-07 Thread Nathan Pinno
error showing up? (Original Message: (Tutor) What's wrong with this code?) Ignore previous post. > Hi! > > > on Thu, 7 Jul 2005 01:13:48 -0600 "Nathan Pinno" <[EMAIL PROTECTED]> wrote : > ------

[Tutor] Why does invalid syntax pop up?

2005-07-07 Thread Nathan Pinno
Hi all,   Why does invalid syntax popup?   Here is the latest code: # This is the code for a password protected program to store passwords.password = "hello"print "The Password Program"print "Copyright 2005 Nathan Pinno."printanswer = raw_

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

2005-07-07 Thread Nathan Pinno
Here is the error: File "D:\password.py", line 45 site = raw_input("Site: ") ^ SyntaxError: invalid syntax HTH, Nathan Pinno - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[E

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

2005-07-07 Thread Nathan Pinno
Here is another error message: Traceback (most recent call last): File "D:\password.py", line 69, in ? main_menu() NameError: name 'main_menu' is not defined Thanks. - Original Message ----- From: "Nathan Pinno" <[EMAIL PROTECTED]>

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

2005-07-07 Thread Nathan Pinno
Here is the latest code, in case you need it: # This is the code for a password protected program to store passwords. password = "hello" print "The Password Program" print "Copyright 2005 Nathan Pinno." print answer = raw_input("What is the pass

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

2005-07-08 Thread Nathan Pinno
Thanks, Danny and all. Adjusted the code, here is the newest code and error: # This is the code for a password protected program to store passwords. password = "hello" print "The Password Program" print "Copyright 2005 Nathan Pinno." print answer = r

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

2005-07-09 Thread Nathan Pinno
one is interested in finishing it, just give me a shout, and I'll send it to you as a ZIP file. Thanks, Nathan Pinno Crew, McDonalds Restaurant, Camrose, AB, Canada http://www.npinnowebsite.ca -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian va

[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 Canad

[Tutor] What's the invalid syntax?

2005-07-09 Thread Nathan Pinno
the letter of your choice. ")   Thanks, 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...

[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] Can I use def without ( ) at the end?

2005-07-09 Thread Nathan Pinno
t make the code easier to read, but harder to code because I have to keep going to the top to read the menu. Not that fun, but necessary for a smooth program, I guess. Nathan Pinno - Original Message - From: "Brian van den Broek" <[EMAIL PROTECTED]> To: &

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" <[EM

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" <[EMA

[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

[Tutor] Looks like Giant Calc is a bust.

2005-07-09 Thread Nathan Pinno
uot;4) Convert Celsius to Kelvins"    print "5) Convert Kelvins to Fahrenheit"    print "6) Convert Fahrenheit to Kelvins"    print "7) Main Menu"    temp_option = input("Choice: ")   def formula_menu():    print "1) Interest"    print &quo

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

2005-07-10 Thread Nathan Pinno
I fixed this bug by myself, I had forgotten to add a print on a line by itself. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 10, 2005 12:29 AM Subject: Re: [

Re: [Tutor] Another newbie question from Nathan.

2005-07-10 Thread Nathan Pinno
t make the code easier to read, but harder to code because I have to keep going to the top to read the menu. Not that fun, but necessary for a smooth program, I guess. Nathan Pinno "Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On

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

2005-07-10 Thread Nathan Pinno
Here's an error message: File "D:\GC.py", line 78 cal_opt = cal_menu() ^ SyntaxError: invalid syntax The relevant code: option = main_menu() if option == 1: cal_menu() cal_opt = cal_menu() if cal_opt == 1: How do I fix this e

[Tutor] Why does my code show this?

2005-07-10 Thread Nathan Pinno
Hey all,   Thought I'd try a mini-calc. Here's the code:   # This is a small calculator.print "Mini Calculator"print "By Nathan Pinno"printprint "CALCULATE MENU"print "1) Add"print "2) Subraction"print "3) Mult

Re: [Tutor] Why does my code show this?

2005-07-10 Thread Nathan Pinno
Thanks to all in the group. Mini_calc is now up and running successfully and is now available to download from my site. Thanks again, Nathan - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sen

[Tutor] Giant Calc runs, but need advice on how to make the menu repopup.

2005-07-12 Thread Nathan Pinno
It runs but now how do I make it go back to the previous menu (e.g. from Add to Calculate Menu?)   Here is the latest screenshot:   The Giant Calculator   Copyright 2005 Written and debugged by Nathan Pinno   OPTIONS MENU1) Calculate2) Shapes3) Temperature4) Formulas5) QuitWhat option would

[Tutor] Just finished creating Shape_Calc.

2005-07-17 Thread Nathan Pinno
Hey all,   Just finished shape_calc.py. If anyone is interested in going through the code, before I send it to my website, let me know. If no one answers this within a week, I post the zip file on my site.   Nathan Pinno. ___ Tutor maillist

Re: [Tutor] Just finished creating Shape_Calc.

2005-07-17 Thread Nathan Pinno
Luke and all,   Shape_calc helps you to find the area, perimeter, and other info about shapes.   Simple enough. - Original Message - From: luke To: Nathan Pinno Sent: Sunday, July 17, 2005 9:42 PM Subject: Re: [Tutor] Just finished

[Tutor] I am going to change Giant Calculator into mini calculators.

2005-07-17 Thread Nathan Pinno
Hey all,   The subject says it all. If anyone is interested in working on Giant Calculator, give me a shout, and I'll send you a ZIP file with the PY file.   Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/lis

Re: [Tutor] Who uses input()? [was Re: question on "input"]

2005-07-18 Thread Nathan Pinno
Terry and all, I thought something like this might popup. I find it easier to remember and faster to code than int(raw_input()). The faster I can code a program, the better in my opinion. So what if it has a few bugs, I fix them gradually. Nathan Pinno - Original Message

Re: [Tutor] Who uses input()? [was Re: question on "input"]

2005-07-18 Thread Nathan Pinno
example. If there is, show me it, please. I'm getting confused writing my MasterMind and don't want to screw up bad, e.g. repeat the same answer in a different way. Thanks, Nathan Pinno. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]>

Re: [Tutor] shape_calc.py

2005-07-18 Thread Nathan Pinno
Raj,   Shape_calc is a calculator for finding information about shapes, e.g. perimeter, area, and so forth.   HTH (Hope This Helps), Nathan Pinno - Original Message - From: Raj Moodley To: [EMAIL PROTECTED] Sent: Monday, July 18, 2005 2:54

Re: [Tutor] shape_calc.py

2005-07-18 Thread Nathan Pinno
on a MasterMind-like game, but it giving me headaches :).   Nathan Pinno. P.S. Enjoy the shape_calc. You can find Mini_calc and Guess the Number on my site at this address: http://www.npinnowebsite.ca/download.htm. - Original Message - From: Raj Moodley

[Tutor] Which is safer and easier to code, raw_input or int(raw_input))?

2005-07-18 Thread Nathan Pinno
Hi all,   The subject line says it all. What's the answer?   Let's let everyone talk about this.   Nathan Pinno. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Which is safer and easier to code, raw_input or int(raw_input))?

2005-07-18 Thread Nathan Pinno
hat I don't miss any.   Nathan Pinno - Original Message - From: luke To: Nathan Pinno Sent: Monday, July 18, 2005 11:44 AM Subject: Re: [Tutor] Which is safer and easier to code,raw_input or int(raw_input))? tmp = raw_input("hello,

Re: [Tutor] shape_calc.py

2005-07-20 Thread Nathan Pinno
Alberto, Sounds great. Go right ahead, and if you have any ideas for any programs or modifications from the apps at my Download page at http://www.npinnowebsite.ca/download.htm, feel free to send them also. Nathan - Original Message - From: "Alberto Troiano&quo

[Tutor] Thanks.

2005-07-26 Thread Nathan Pinno
Thanks all for helping me. Thanks to the group, I have figured out a way to make Giant Calculator and any program repeat until the user wants to exit.   Thanks again, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman

[Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
How do I make Python draw a shape? e.g. a triangle Is there a specific module that I have to call, or what is the command(s)?   Thanks, Nathan Pinno   P.S. Knowing this will help me make my shape_calc program better. ___ Tutor maillist - Tutor

[Tutor] How do I go about this?

2005-07-27 Thread Nathan Pinno
for the help, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I go about this?

2005-07-27 Thread Nathan Pinno
Luis and all,   I want to more than matching, I am trying to find all the available combos, e.g a1 == x1 or a1 == x2 or a1 != x1.   HTH, Nathan Pinno    I also noticed you forgot the a[1] == b[1]. (grin) :)   - Original Message - From: Luis N To: tutor@python.org Sent

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Thanks. Will ask if I have any more questions. Maybe I won't have to go to Visual Basic to write my games. Maybe Python will do the trick. Thanks again. Nathan Pinno - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAI

[Tutor] Why does this NameError appear?

2005-07-27 Thread Nathan Pinno
ot defined Thanks in advance, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Luke, Thanks for the reminder. Though I might try Java, but having problems with errors left, right and center. G2G, Nathan - Original Message - From: "luke" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PR

Re: [Tutor] How do I make Python draw?

2005-07-27 Thread Nathan Pinno
Pygame looks solid. I'm sold on it. Maybe I'll be able to code my Guess the Number Sequence Game with it using Python. - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, July 27

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [was Re: question on "input"]]

2005-07-27 Thread Nathan Pinno
I first posted my question in this post, but no one seemed to answer me. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: ; "Terry Reedy" <[EMAIL PROTECTED]> Sent: Monday, July 18,

[Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
stb:  print item,other   Thanks in advance, Nathan Pinno ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How do I go about this? [was Re: Who uses input()? [was Re: question on "input"]]

2005-07-27 Thread Nathan Pinno
Here's part of what I'm looking for (got it from a Python program): a b a 2 a 5 a 6 1 b 1 2 1 5 1 6 3 b 3 2 3 5 3 6 4 b 4 2 4 5 4 6 I want to see also !=, ==, and, & nor combos also. 0 != 2 for an example. - Original Message - From: "Danny Yoo" <[EMAIL PR

Re: [Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
Thanks. Now it basically works. Now I just have to improve it. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Wednesday, July 27, 2005 6:06 PM Subject: Re: [Tutor] I'm stumped. > Try t

Re: [Tutor] OT: we won't eat VB programmers for lunch [Was: How doI make Python draw?]

2005-07-27 Thread Nathan Pinno
Now that's worth the mention of VB. Glad I have Python, or many of my ideas would stay in my head...hehehe - Original Message - From: "luke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Tutor" Sent: Wednesday, July 27, 2005 6:28 PM Subject: Re: [Tutor] OT: we won't eat VB programmers fo

Re: [Tutor] I'm stumped.

2005-07-27 Thread Nathan Pinno
It works. The program will be found on my webpage at it's new address http://falcon3166.tripod.com in the Downloads page. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Alan G" <[EMAIL PROTECTED]>; Sent: Wednesday, July 27,

Re: [Tutor] OT: we won't eat VB programmers for lunch [Was: How doImake Python draw?]

2005-07-29 Thread Nathan Pinno
I got it Alan. It was good. Thanks. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor" Sent: Thursday, July 28, 2005 4:15 AM Subject: Re: [Tutor] OT: we won't eat VB programmers for lu

[Tutor] How do I get rid of blank space when running a program I've coded?

2005-07-30 Thread Nathan Pinno
Hi all,   I'll be brief. I always get a blank line whenever I run my Python programs that I've coded. How can I get rid of it. It's kind of annoying to press the spacebar in order to return to >>> in IDLE or the C:\ prompt i

Re: [Tutor] How do I get rid of blank space when running a program I'vecoded?

2005-07-30 Thread Nathan Pinno
I meant the return key, not the spacebar. Sorry for the mix-up. - Original Message - From: Nathan Pinno To: tutor@python.org Sent: Saturday, July 30, 2005 3:50 PM Subject: [Tutor] How do I get rid of blank space when running a program I'vecoded? H

[Tutor] What's the invalid synax? Error message and code supplied.

2005-07-30 Thread Nathan Pinno
2) Area (Rectangle)'    print '3) Area (Square)'    print '4) Perimeter (Circle)'    print '5) Perimeter (Square)'    print '6) Perimeter (Rectangle)'    print '9) Exit'   import mathprint 'By Nathan Pinno'print 'ID#

Re: [Tutor] What's the invalid synax? Error message and codesupplied.

2005-07-30 Thread Nathan Pinno
; (Once > you have it working). > > Happy Debugging > > --Todd > > > On Saturday 30 July 2005 06:19 pm, Nathan Pinno wrote: >> Here's the message: >> File "D:\Python22\prog4.py", line 19 >> while option != 9: >> ^ >> S

[Tutor] How do I make a Python program keep repeating?

2005-07-30 Thread Nathan Pinno
Hi all,   How do I make a program keep repeating until the user is done with it?   Thanks, Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] When I run this code, it just keeps repeating.

2005-07-30 Thread Nathan Pinno
When I run the following code it just keeps repeating. Here is a screen shot showing what I mean: Mini CalculatorBy Nathan Pinno   CALCULATE MENU1) Add2) Subraction3) Multiplication4) Division w/o remainder5) Division with remaider6) Exponation7) Square roots9) ExitOption: 5First number

Re: [Tutor] When I run this code, it just keeps repeating.

2005-07-30 Thread Nathan Pinno
loop again. > > Another comment - the global cal_opt is considered evil by many. Better > would > be: > > def cal(): > return int(raw_input("Option: ")) > > print "Mini Calculator" > print "By Nathan Pinno" > print > >

[Tutor] Now what do I do?(was Re: When I run this code, it just keeps repeating.)

2005-07-30 Thread Nathan Pinno
Here is another screen shot: Mini Calculator By Nathan Pinno CALCULATE MENU 1) Add 2) Subraction 3) Multiplication 4) Division w/o remainder 5) Division with remaider 6) Exponation 7) Square roots 9) Exit Option: 3 First number:4 Second number:6 4 * 6 = 24 CALCULATE MENU 1) Add 2) Subraction 3

Re: [Tutor] How do I get rid of blank space when running a program I'vecoded?

2005-07-30 Thread Nathan Pinno
hat you want to run by double-clicking them but you can take it > out if you find it annoying. > > Kent > > Nathan Pinno wrote: >> I meant the return key, not the spacebar. Sorry for the mix-up. >> >> - Original Message - >> *From:* Nathan Pi

Re: [Tutor] Now what do I do?(was Re: When I run this code, it just keeps repeating.)

2005-07-30 Thread Nathan Pinno
Glad I didn't put up my mini calculator apps on my site. Would have had complaints from people. But this thread has given me ideas on how to fix them all, and how to fix Giant Calculator as well. - Original Message - From: "Reed L. O'Brien" <[EMAIL PROTECTED]>

[Tutor] Help with file I/O.

2005-07-30 Thread Nathan Pinno
If anyone will help me learn file I/O, it would be appreciated. I went through Josh Cogliani's Non-Programmer's Tutorial for Python, and I still can't understand it.   Thanks in advance, Nathan Pinno ___ Tutor maillist - Tutor@

Re: [Tutor] cant get started

2005-07-30 Thread Nathan Pinno
This is an easy one. Go to the IDLE, I found it was easier. The latest Python refused to work on mine, so I'm using 2.2.3, and it works fine. - Original Message - From: [EMAIL PROTECTED] To: tutor@python.org Sent: Friday, July 29, 2005 10:22 PM Subject: [Tutor] cant g

Re: [Tutor] Help with file I/O.

2005-07-30 Thread Nathan Pinno
Well, you saw my password program. That was my first attempt at using file I/O. Thought I'd try it big time. You saw where that went. Nathan - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]> Cc: Sent: S

Re: [Tutor] How do I make a Python program keep repeating?

2005-07-31 Thread Nathan Pinno
I'd post another code, but I've already figured it out, thanks to help on the mini calc program. - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Sunday, July 31, 2005 2:03 AM Subject: Re: [

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
Here's my work. I call it filewriter. The code: file = raw_input("File name please: ") f = file(file, "r") for line in f.readlines(): print line f.close() Will it do the trick? Nathan - Original Message - From: "Danny Yoo" <[EMAIL PROTECTED]

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
understand. ----- Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc: Sent: Sunday, July 31, 2005 2:29 PM Subject: Re: [Tutor] Help with file I/O. > Here's my work. I call it filewriter. > The code: > file

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
Here's the improved version. file = raw_input("File name please: ") f = open(file) for line in f.readlines(): print line f.close() - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Danny Yoo" <[EMAIL PROTECTED]> Cc:

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
Okay I understand how to open and read to a file, but how do I write to a file, e.g. a list. - Original Message - From: "Nathan Pinno" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]> Cc: Sent: S

[Tutor] Thanks to all!

2005-07-31 Thread Nathan Pinno
Thank you to all. All my calculators run perfect. I can now make a perfect Giant Calculator as well.   Thanks again, Nathan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Thanks to all!

2005-07-31 Thread Nathan Pinno
The Giant Calculator is perfect also! - Original Message - From: Nathan Pinno To: tutor@python.org Sent: Sunday, July 31, 2005 3:34 PM Subject: [Tutor] Thanks to all! Thank you to all. All my calculators run perfect. I can now make a perfect Giant Calculator

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
write the main part of a password program, then when that's solid, I'll add the file I/O. Maybe I'll try the exercise where I have to add file I/O to a grades program, in the Non-Programmer's Tutorial for Python. - Original Message - From: "luke" <[EMAIL PROT

Re: [Tutor] Thanks to all!

2005-07-31 Thread Nathan Pinno
ct: Re: [Tutor] Thanks to all! > > Congratulations! So what are you going to try next? > > --Todd > > On Sunday 31 July 2005 06:27 pm, Nathan Pinno wrote: >> The Giant Calculator is perfect also! >> - Original Message - >> From: Nathan Pinno >>

[Tutor] What's the invaild syntax? Error message and relative code supplied.

2005-07-31 Thread Nathan Pinno
h = 1234    while which != -1:    which = int(raw_input("Change which Grade: ")    which = which-1    if 0 <= which < len(grades):    grade = int(raw_input("Grade: ")    grades[which]

Re: [Tutor] What's the invaild syntax? Error message and relativecode supplied.

2005-07-31 Thread Nathan Pinno
Take a look at the line before the one you are getting the error on. > And count the ('s and the )'s. > > --Todd > > > > On Sunday 31 July 2005 07:38 pm, Nathan Pinno wrote: >> What the invalid syntax? Here is the error message: >> SyntaxError: invalid synt

Re: [Tutor] What's the invaild syntax? Error message and relative codesupplied.

2005-07-31 Thread Nathan Pinno
Thanks again Luke. - Original Message - From: "luke" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; Sent: Sunday, July 31, 2005 5:50 PM Subject: Re: [Tutor] What's the invaild syntax? Error message and relative codesupplied. >

Re: [Tutor] Help with file I/O.

2005-07-31 Thread Nathan Pinno
Does it display stars instead? - Original Message - From: "Alan G" <[EMAIL PROTECTED]> To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Alberto Troiano" <[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]>; "luke" <[E

  1   2   3   4   >