zhuyifei1999 added a comment.

Does that mean hasattr(sys, '__interactivehook__') is True only on CPython + GNU (therefore only on Linux)?

No, it is True on CPython 3.4+, with either:

  • default unaltered standard library, especially site, and and that module is either imported automatically (when python is not started with -S, or it's imported manually), and that the function enablerlcompleter() successfully executed (usually when the python is not started with -I), and no user provided code (eg. via PYTHONSTARTUP) deletes the attribute
  • user provided sys.__interactivehook__ (eg. via PYTHONSTARTUP).

So it's True on all platforms by default, but calling it may not have any effects on some platforms.


TASK DETAIL
https://phabricator.wikimedia.org/T196168

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: zhuyifei1999
Cc: zhuyifei1999, Xqt, gerritbot, Aklapper, pywikibot-bugs-list, Dvorapa, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Baloch007, Darkminds3113, Bsandipan, Lordiis, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, Magul, Tbscho, MayS, Salgo60, Lewizho99, Mdupont, JJMC89, Maathavan, Avicennasis, jayvdb, Dalba, Masti, Alchimista, Rxy
_______________________________________________
pywikibot-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs

Reply via email to