This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.araujo
Recipients belopolsky, cben, eric.araujo, lesmana, loewis, ned.deily, pitrou, r.david.murray, ronaldoussoren
Date 2011-09-06.16:14:42
SpamBayes Score 8.871126e-12
Marked as misclassified No
Message-id <>
> sys.__interactivehook__ has the benefit of being cleanly settable from python code.
> But it might well be a YAGNI idea.
I’ll ask python-dev about that.  For the moment, I prefer the idea of a new sys.interactive attribute (boolean).

>> $PYTHONSTARTUP doesn't work with -i
> Perhaps it should?
-i means two things: interactive and inspect.  The second meaning is used when you want python to execute a script or module just as usual but without exiting afterward, to let you inspect the state of the program.  Supporting PYTHONSTARTUP would change these use cases and be an unacceptable change.

>> BTW, drawback of doing any such setup in "python -S" 
>> would be unfriendly!
> People using -S don’t want the customizations done in site, so I 
> don’t think there’s a problem here.

> python -S doesn't disable readline.
> What makes completions more of a "customization" than editing?
> The fact that it'd be implemented in
If you go back to the first messages of this report, you’ll see that I wasn’t sure what a good location would be, and decided site because it did not look out of place.  There isn’t a stronger rationale than that.  One could argue that even now, site mixes disparate functionality: one program could wish to use -S to disable sys.path munging but run into bugs because the builtin exit is not defined anymore for example.

> Yes, obviously, if it's implemented in, -S should disable it.
We agree.

> My point was that it doesn't have to be implemented there.
I really want to explore all options before renouncing to implement it in site.  I’d like the implementation to be maintainable and shareable with other Python VMs.
Date User Action Args
2011-09-06 16:14:43eric.araujosetrecipients: + eric.araujo, loewis, ronaldoussoren, cben, belopolsky, pitrou, ned.deily, r.david.murray, lesmana
2011-09-06 16:14:43eric.araujosetmessageid: <>
2011-09-06 16:14:42eric.araujolinkissue5845 messages
2011-09-06 16:14:42eric.araujocreate