Skip to content

Conversation

@zware
Copy link
Member

@zware zware commented Sep 4, 2018

Check for functionality via imports rather than checking sys.platform
specifically for Windows

https://bugs.python.org/issue8110

Check for functionality via imports rather than checking sys.platform
specifically for Windows
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

try:
import msvcrt
import _winapi
_mswindows = True
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be in the "else" block?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The _mswindows = True? sure, it could be. But it doesn't matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants