Re: [Tutor] Interactive programming.

2009-01-07 Thread Alan Gauld
"Edwin Boyette" wrote Don't try to make interactive programming something its not. It's handy if you have something short to try out, want to evaluate a function at some value etc. Don't rage at the hammer for not being an allen wrench But in this case it is a valid complaint. Almost every

Re: [Tutor] Interactive programming.

2009-01-07 Thread Edwin Boyette
e: From: Kent Johnson Subject: Re: [Tutor] Interactive programming. To: "WM." Cc: "Sander Sweers" , tutor@python.org Date: Wednesday, January 7, 2009, 5:38 PM -Inline Attachment Follows- On Wed, Jan 7, 2009 at 5:36 PM, WM. wrote: > IDLE 2.6 >>>&

Re: [Tutor] Interactive programming.

2009-01-07 Thread Kent Johnson
On Wed, Jan 7, 2009 at 5:36 PM, WM. wrote: > IDLE 2.6 i = 1 if i > 1: >print 'x' > else: >print 'y' > > > y > Last post on this topic, I guess. > I think that the script looks pretty lame, though. It was always lame :-) but you got it to work... Kent __

Re: [Tutor] Interactive programming.

2009-01-07 Thread Kent Johnson
On Wed, Jan 7, 2009 at 4:45 PM, WM. wrote: > Norman Khine wrote: >> >> >>> i = 5 >> >>> j = 7 >> >>> if i <= j: >> ... print 'nudge', 'nudge' >> ... else: >> ... print 'whatever' >> ... >> nudge nudge > > The above is just what the tutorials said would happen. > Can anyone give me a ste

Re: [Tutor] Interactive programming.

2009-01-07 Thread WM.
IDLE 2.6 >>> i = 1 >>> if i > 1: print 'x' else: print 'y' y >>> Last post on this topic, I guess. I think that the script looks pretty lame, though. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinf

Re: [Tutor] Interactive programming.

2009-01-07 Thread Sander Sweers
On Wed, Jan 7, 2009 at 22:45, WM. wrote: > Norman Khine wrote: >> >> >>> i = 5 >> >>> j = 7 >> >>> if i <= j: >> ... print 'nudge', 'nudge' >> ... else: >> ... print 'whatever' >> ... >> nudge nudge > > The above is just what the tutorials said would happen. > Can anyone give me a step-

Re: [Tutor] Interactive programming.

2009-01-07 Thread WM.
Norman Khine wrote: >>> i = 5 >>> j = 7 >>> if i <= j: ... print 'nudge', 'nudge' ... else: ... print 'whatever' ... nudge nudge The above is just what the tutorials said would happen. Can anyone give me a step-by-step in IDLE 2.6 that would make this happen? __

Re: [Tutor] Interactive programming.

2009-01-07 Thread Edwin Boyette
--- On Wed, 1/7/09, WM. wrote: From: WM. Subject: Re: [Tutor] Interactive programming. To: "A.T.Hofkamp" Cc: tutor@python.org Date: Wednesday, January 7, 2009, 11:46 AM IDLE 2.6 >>> i = 1 >>> j = 11 >>> if  j > 1:     print j     else:       

Re: [Tutor] Interactive programming.

2009-01-07 Thread Kent Johnson
On Wed, Jan 7, 2009 at 11:46 AM, WM. wrote: > IDLE 2.6 i = 1 j = 11 if j > 1: >print j >else: > > SyntaxError: invalid syntax > > I am getting a little dizzy here. > > I know about text editor, code, save, F5. > > Many tutorials say that it is funner and faster

Re: [Tutor] Interactive programming.

2009-01-07 Thread WM.
IDLE 2.6 >>> i = 1 >>> j = 11 >>> if j > 1: print j else: SyntaxError: invalid syntax >>> I am getting a little dizzy here. I know about text editor, code, save, F5. Many tutorials say that it is funner and faster to test an idea 'interactively', using IDLE.

Re: [Tutor] Interactive programming.

2009-01-07 Thread A.T.Hofkamp
Kent Johnson wrote: On Wed, Jan 7, 2009 at 5:28 AM, A.T.Hofkamp wrote: WM. wrote: Norman Khine wrote: >>> i = 5 >>> j = 7 >>> if i <= j: ... print 'nudge', 'nudge' ... else: ... print 'whatever' ... nudge nudge >>> Yes, I understand how your program works. What I do not understa

Re: [Tutor] Interactive programming.

2009-01-07 Thread Kent Johnson
On Wed, Jan 7, 2009 at 5:28 AM, A.T.Hofkamp wrote: > WM. wrote: >> >> Norman Khine wrote: >>> >>> >>> i = 5 >>> >>> j = 7 >>> >>> if i <= j: >>> ... print 'nudge', 'nudge' >>> ... else: >>> ... print 'whatever' >>> ... >>> nudge nudge >>> >>> > >> Yes, I understand how your program wor

Re: [Tutor] Interactive programming.

2009-01-07 Thread A.T.Hofkamp
WM. wrote: Norman Khine wrote: >>> i = 5 >>> j = 7 >>> if i <= j: ... print 'nudge', 'nudge' ... else: ... print 'whatever' ... nudge nudge >>> Yes, I understand how your program works. What I do not understand is how you got it. My program came out in IDLE as you see it. No ..

Re: [Tutor] Interactive programming.

2009-01-06 Thread WM.
Norman Khine wrote: >>> i = 5 >>> j = 7 >>> if i <= j: ... print 'nudge', 'nudge' ... else: ... print 'whatever' ... nudge nudge >>> WM. wrote: >>> i = 5 >>> j = 7 >>> if i <= j: print 'nudge, nudge' else: File "", line 3 else: ^ IndentationError: u

Re: [Tutor] Interactive programming.

2009-01-06 Thread Sander Sweers
On Tue, Jan 6, 2009 at 20:12, WM. wrote: i = 5 j = 7 if i <= j: >print 'nudge, nudge' > else: > > File "", line 3 >else: > ^ > IndentationError: unexpected indent Python uses indentation to seperate code blocks and will throw an error if it finds inconsistan

Re: [Tutor] Interactive programming.

2009-01-06 Thread Alan Gauld
"WM." wrote >>> i = 5 >>> j = 7 >>> if i <= j: print 'nudge, nudge' else: File "", line 3 else: ^ IndentationError: unexpected indent Running in IDLE, all is well until "else:". IDLE seems perplexed This is, in my view, a long standing bug in IDLE. It doesn't show indent

Re: [Tutor] Interactive programming.

2009-01-06 Thread Norman Khine
>>> i = 5 >>> j = 7 >>> if i <= j: ... print 'nudge', 'nudge' ... else: ... print 'whatever' ... nudge nudge >>> WM. wrote: >>> i = 5 >>> j = 7 >>> if i <= j: print 'nudge, nudge' else: File "", line 3 else: ^ IndentationError: unexpected indent Runni