[Tutor] running program in terminal

Alan Gauld alan.gauld at btinternet.com
Tue Sep 25 02:02:05 CEST 2012

On 25/09/12 00:31, Benjamin Fishbein wrote:

>     Last login: Mon Sep 24 18:27:48 on ttys000
>     Benjamins-MacBook-Air:~ bfishbein$ cd
>     '/Users/bfishbein/Documents/Python in Use/' &&
>     '/usr/local/bin/pythonw'  '/Users/bfishbein/Documents/Python in
>     Use/BB.py'  && echo Exit status: $? && exit 1

When debugging simplify the code.
In this case break it into individual commands so you can see the effect 
of each one and see where the errors are coming from.


>     put in the text input
>     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
,,, snip ,,,

>     href='http://www.textbooks.com/apple-touch-icon.png' /><link
>     rel='apple-touch-icon-precomposed' sizes='114x114' href='http:Exit
>     status: 0
>     logout
>     [Process completed]

This looks to be doing exactly what you asked it to.
So the error, if any such exists, seems to be in your
Python code. Or maybe its just finished processing
earlier than you expected (due to a data issue maybe?)

But without sight of the code its hard to say...

> launcher. But for the programs like this one that take large chunks of
> raw input and then parse through them, it stops after a dozen lines or
> so...it doesn't even finish pasting the text into the terminal.

When you say it 'stops' what exactly do you mean?
The above output suggests that far from stopping
the program terminates successfully (exit status 0).

Alan G
Author of the Learn to Program web site

More information about the Tutor mailing list