why does python execute line bye line as im coding?????????

Cliff Wells clifford.wells at attbi.com
Sat Jun 14 01:22:15 EDT 2003


On Fri, 2003-06-13 at 20:52, L48R4T wrote:
> im just going through the python for beginrers tutorial and all was cool untill
> i stated trying to do thing s like
> input = name("whats your name")
> print "hello  "name
> 
> the above example would execute after i hit return on the first line. not
> giving me the chance to input the second line of code ???????????????????
> any help wi=ould be a blessing thanks 

Mistakes or omissions in the above code aside, if you are typing code
into the interactive interpreter, then it executes each line as you type
it.  This is useful for testing things out.  If you want to write an
entire program and execute it all at once, you need to use a text editor
(preferably emacs) to create the file (something like "myprogram.py")
and then use the command "python myprogram.py" to run it.

Regards,

-- 
Cliff Wells <clifford.wells at attbi.com>






More information about the Python-list mailing list