def lowpriority():
    """ Set the priority of the process to below-normal."""
    import sys
    try:
        sys.getwindowsversion()
    except AttributeError:
        isWindows = False
    else:
        isWindows = True
    if isWindows:
        import win32api
        import win32process
        import win32con
        pid = win32api.GetCurrentProcessId()
        handle = win32api.OpenProcess(win32con.PROCESS_ALL_ACCESS, True, pid)
        win32process.SetPriorityClass(handle, win32process.
            BELOW_NORMAL_PRIORITY_CLASS)
    else:
        import os
        os.nice(1)
