python -i (interactive environment)
Reinhold Birkenfeld
reinhold-birkenfeld-nospam at wolke7.net
Sun Mar 6 17:27:01 EST 2005
Michael Hoffman wrote:
> Joe wrote:
>
>> Are there any differences between that and the actual interactve prompt that
>> I should be aware of?
>
> I don't know, unfortunately.
>
>> Would you consider that a better method than using (thanks to those who
>> suggested this other option):
>>
>> import os
>> os.environ['PYTHONINSPECT'] = '1'
>
> Actually I would do that everyone else suggested for your use case. I thought
> about trying this method but couldn't imagine that it would actually work!
Actually, using this behavior is encouraged by the developers. See this
comment in Modules/main.c:
/* Check this environment variable at the end, to give programs the
* opportunity to set it from Python.
*/
Reinhold
More information about the Python-list
mailing list