Message143617
| Author |
cben |
| Recipients |
belopolsky, cben, eric.araujo, lesmana, loewis, ned.deily, pitrou, r.david.murray, ronaldoussoren |
| Date |
2011年09月06日.15:54:26 |
| SpamBayes Score |
2.0839165e-07 |
| Marked as misclassified |
No |
| Message-id |
<CAAPosH3dBQjdVDSvaNCNsagYVae9K-XW3Wbw+PdPqH2hGodJ-A@mail.gmail.com> |
| In-reply-to |
<1315320714.3617.7.camel@localhost.localdomain> |
| Content |
On Tue, Sep 6, 2011 at 17:54, Antoine Pitrou <report@bugs.python.org> wrote:
It covers the user's desire customization very well (esp. if it worked with
-i).
sys.__interactivehook__ has the benefit of being cleanly settable from
python code.
But it might well be a YAGNI idea.
$PYTHONSTARTUP doesn't work with -i
>
Perhaps it should?
I can't think of a thing that makes sense in $PYTHONSTARTUP that I wouldn't
want with -i.
(and if there is one, one can add a test for sys.flags.interactive, or run
with env PYTHONSTARTUP='')
Point to watch out for: errors in $PYTHONSTARTUP.
One of the uses of "python -i script.py" is doing pdb.pm() on an exception
thrown by the script;
ideally a broken $PYTHONSTARTUP would not overr
"customization" than editing?
The fact that it'd be implemented in site.py?
Yes, obviously, if it's implemented in site.py, -S should disable it. My
point was that it doesn't have to be implemented there. You could drink the
cool aid instead :-) |
| Files |
| File name |
Uploaded |
|
unnamed
|
cben,
2011年09月06日.15:54:25
|
|