Python 2:
See https://bugs.python.org/issue12326 for a long winded 'official' discussion.
For a summary see: https://stackoverflow.com/questions/1041...not-linux3
In the summary link it is suggested to use one of:
It is also mentioned that 'win32' is used on all Windows systems, as apparently the term 'Win64' offends Microsoft.
Lewis
Output:>>> import sys
>>> sys.platform
'linux2'
>>>
Python 3:Output:>>> import sys
>>> sys.platform
'linux'
>>>
It's not a bug, it's a 'feature'. The '3' was removed in Python 3.3See https://bugs.python.org/issue12326 for a long winded 'official' discussion.
For a summary see: https://stackoverflow.com/questions/1041...not-linux3
In the summary link it is suggested to use one of:
sys.platform.startswith('linux') sys.platform == 'linux' # if you don't need to support older Python versions
It is also mentioned that 'win32' is used on all Windows systems, as apparently the term 'Win64' offends Microsoft.
Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00