Re: [Tutor] New guy question...

2009-09-15 Thread Rich Lovely
2009/9/15 Warren : >> >> Does TextMate support input into a running Python program? I'm not >> sure if it supports standard input. You might have to run the program >> from Terminal to get this to work. > > > Good question, Kent.  That might be the root of all of this pain.  I'll > experiment when

Re: [Tutor] New guy question...

2009-09-15 Thread Warren
Does TextMate support input into a running Python program? I'm not sure if it supports standard input. You might have to run the program from Terminal to get this to work. Good question, Kent. That might be the root of all of this pain. I'll experiment when I get a chance... - Warren (wa

Re: [Tutor] New guy question...

2009-09-15 Thread Kent Johnson
On Tue, Sep 15, 2009 at 9:07 AM, Warren wrote: > Second, I think my machine is probably set up a little weird.  I have Python > 2.6.2 installed alongside 3.1.1 so maybe that makes a difference. That should be fine. >  I'm > writing programs in TextMate and running them from there.  Which seemed

Re: [Tutor] New guy question...

2009-09-15 Thread Warren
First, let me say thanks for all the responses! This definitely looks like a useful mailing list for complete noobs like me. Second, I think my machine is probably set up a little weird. I have Python 2.6.2 installed alongside 3.1.1 so maybe that makes a difference. I'm writing program

Re: [Tutor] New guy question...

2009-09-14 Thread David
Rich Lovely wrote: 2009/9/14 Warren : Hey all, I'm just getting started with Python and I'm working my way through my first "Learn Python" book on my Mac. I ran into a weird issue though. Here's the example code I'm using: #!/usr/bin/env python3 print( "Type integers, each followed by ENTER

Re: [Tutor] New guy question...

2009-09-14 Thread Alan Gauld
"Warren" wrote while True: line = input() Beats me, it works OK on my XP box. try: number = int(line) except ValueErr as err: Are you sure this shouldn't be ValueError rather than ValueErr? It won't be causing your current problem but it might cause your next one! :-) Now, w

Re: [Tutor] New guy question...

2009-09-14 Thread Rich Lovely
2009/9/14 Warren : > > Hey all, > > I'm just getting started with Python and I'm working my way through my first > "Learn Python" book on my Mac.  I ran into a weird issue though.  Here's the > example code I'm using: > > #!/usr/bin/env python3 > > print( "Type integers, each followed by ENTER; or

Re: [Tutor] New guy question...

2009-09-14 Thread Dave Angel
(You're top-posting, which makes the message flow very confusing) Warren wrote: Well, I thought that as well but I took it out which makes it run under 2.6.1 and I get similar, but not exactly the same, output: Type integers, each followed by ENTER; or just ENTER to finish EOFError: EOF wh

Re: [Tutor] New guy question...

2009-09-14 Thread Wayne
On Mon, Sep 14, 2009 at 3:31 PM, Marc Tompkins wrote: > On Mon, Sep 14, 2009 at 12:30 PM, Warren wrote: > > Type integers, each followed by ENTER; or just ENTER to finish > > Traceback (most recent call last): > > method in test.py at line 9 > >line = input() > > EOFError: EOF when reading

Re: [Tutor] New guy question...

2009-09-14 Thread Mark Freeman
Have you tried running this line by line through the interactive shell? Given, I'm not doing this on a mac, but your input() call doesn't fail for me. I'm using Python 2.6. mark ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscriptio

Re: [Tutor] New guy question...

2009-09-14 Thread Marc Tompkins
On Mon, Sep 14, 2009 at 12:30 PM, Warren wrote: > Type integers, each followed by ENTER; or just ENTER to finish > Traceback (most recent call last): >  method in test.py at line 9 >    line = input() > EOFError: EOF when reading a line > > Why is the "input" statement not waiting for input like

Re: [Tutor] New guy question...

2009-09-14 Thread Warren
Well, I thought that as well but I took it out which makes it run under 2.6.1 and I get similar, but not exactly the same, output: Type integers, each followed by ENTER; or just ENTER to finish EOFError: EOF when reading a line - Warren (war...@wantonhubris.com) On Sep 14, 2009, at 3

Re: [Tutor] New guy question...

2009-09-14 Thread bob gailer
Warren wrote: Hey all, I'm just getting started with Python and I'm working my way through my first "Learn Python" book on my Mac. I ran into a weird issue though. Here's the example code I'm using: #!/usr/bin/env python3 print( "Type integers, each followed by ENTER; or just ENTER to fi

Re: [Tutor] New guy question...

2009-09-14 Thread Robert Berman
Hi, I noticed this: #!/usr/bin/env python3 which I think indicates you are using python version 3. I strongly suspect you are reading a text based on one of the version 2 issues of python. You might consider dropping back a version(such as 2.6.) since most learning texts are not updated to w

[Tutor] New guy question...

2009-09-14 Thread Warren
Hey all, I'm just getting started with Python and I'm working my way through my first "Learn Python" book on my Mac. I ran into a weird issue though. Here's the example code I'm using: #!/usr/bin/env python3 print( "Type integers, each followed by ENTER; or just ENTER to finish" ) t