[Tutor] Python Characteristics.

Steve Willoughby steve at alchemy.com
Wed Jul 9 18:45:29 CEST 2008


Jeremiah Stack wrote:
> Hello All,
> 
> I was pondering something. when you are in the live environment receiving
> immediate feedback is it basically a compiler (or program), responding to
> what the user inputs, or is it like the bash shell where I could tell it to
> search the file system for a certain file?

Yes.

:)

That's sort of a philosophical question, at least from one point of 
view.  Python compiles the source code you give it before running it. 
With the interactive mode, it's simply compiling lines of code on the 
fly as you input them, and executing them, and printing the return value 
of each statement you type, rather than having you prepare them in a 
file and feeding them to it all at once.  Otherwise everything's 
identical as far as what the system is doing and how it interacts with 
the environment.

So it's not like a shell in that respect, (unlike, say, tclsh is for the 
TCL interactive environment).  Certainly, however, you could write 
Python code to interact with the file system in any manner you choose, 
and that code would work equally well at the interactive prompt and as 
part of a stored program file.

> Or how does python interact with the environment it is in?
> 
> If those are too broad of questions just pass.



> 
> Sorry for the illiterate questions.
> 
> Thanks
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list