rattail.win32

Windows Platform Utilities

rattail.win32.file_is_free(path)[source]

Returns boolean indicating whether or not the file located at path is currently tied up in any way by another process.

rattail.win32.is_64bit()[source]

Determine if the host machine runs a 64-bit version of Windows.

rattail.win32.process_is_elevated()[source]

Check if the current process is running with an “elevated token.”

This is meant to indicate whether administrative privileges are in effect. Returns a boolean value.

rattail.win32.require_elevation()[source]

Exit properly if the current process does not have an “elevated token.”

If the result of process_is_elevated() is False, this function will print a brief message to sys.stderr and exit with the error code recommended by Microsoft for this scenario.