[Tutor] Cross-Module Interaction
Corey Richardson
kb1pkl at aim.com
Sat Feb 26 12:06:06 CET 2011
On 02/26/2011 06:02 AM, Walter Prins wrote:
> On 26 February 2011 05:33, Corey Richardson <kb1pkl at aim.com> wrote:
>
>> Aha, that explains why I didn't get any results. Each file got its own
>> interpreter instance.
>>
>
> Not wanting to nit pick, but no: It's not that each *file* does has its own
> interpreter instance, it's that every python instance that you start does
> not automatically persist anything that gets created while it lives. In
> other words, you can import many modules (files) into any given interpreter
> instance, but whether or not the stuff gets persisted anywhere is a seperate
> matter.
>
> Walter
>
I ran them like this:
python use1.py
python use2.py
python plib.py
Each file got its own instance of the interpreter.
--
Corey Richardson
More information about the Tutor
mailing list