[Tutor] Tutor Digest, Vol 28, Issue 10

Kent Johnson kent37 at tds.net
Wed Jun 7 01:50:01 CEST 2006


Kermit Rose wrote:
> Thank you very much.  It looks exactly what I wished to know.
>  
> But now, I realize that I don't know how to invoke Python to compile and 
> execute the
> program file.

There is no separate compile step, Python does that automatically. The 
details of running a program vary depending on your OS and how you 
create the file. Here are some directions:
http://www.byteofpython.info/read/source-file.html
http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html
>  
> I will be making rapid changes to the file, and recompiling over and 
> over again as
> I change the program during my experimentation.

Python is great for quick-turnaround incremental development.
>  
> I guess that in the open command,  the  rb stands for read and something 
> else. 
> what is that something else?

Binary. When a file is read in text mode, any line ending (CR, LF or 
CRLF) is converted to a newline (\n) character.

Kent

PS The standard on most public mailing lists is to send text email 
rather than HTML. I for one would appreciate it if you would lose the 
background graphics!



More information about the Tutor mailing list