platform

Platform-specific code lives here.

This is its own module to abstract away what would otherwise be distracting logic-flow interruptions.

invoke.platform.WINDOWS = False

Whether or not the current platform appears to be Windows in nature.

Note that Cygwin’s Python is actually close enough to “real” UNIXes that it doesn’t need (or want!) to use PyWin32 – so we only test for literal Win32 setups (vanilla Python, ActiveState etc) here.

invoke.platform.pty_size()

Determine current local pseudoterminal dimensions.

Returns:A (num_cols, num_rows) two-tuple describing PTY size. Defaults to (80, 24) if unable to get a sensible result dynamically.