On Sat, Oct 15, 2016 at 4:52 AM, Sebastian Krause <sebast...@realpath.org> wrote: > Nathaniel Smith <n...@pobox.com> wrote: >> The compiler information generally reveals the OS as well (if only >> accidentally), and the OS is often useful information. > > But in which situation would you really need to call Python from > outside to find out which OS you're on?
It's an easy way to gather info. Example: rosuav@sikorsky:~$ python3 -Wall Python 3.7.0a0 (default:897fe8fa14b5+, Oct 15 2016, 03:27:56) [GCC 6.1.1 20160802] on linux Type "help", "copyright", "credits" or "license" for more information. >>> "C:\Users\Demo" File "<stdin>", line 1 SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape >>> "C:\Documents\Demo" sys:1: DeprecationWarning: invalid escape sequence '\D' sys:1: DeprecationWarning: invalid escape sequence '\D' 'C:\\Documents\\Demo' Just by copying and pasting the header, I tell every reader what kind of system I'm running this on. Sure, I could tell you that I'm running Debian Stretch, and I could tell you that I've compiled Python from tip, but the header says all that and in a way that is permanently valid. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/