display = Xlib.display.Display()
screen = display.screen()
root = screen.root
sendEvent(root, display.intern_atom('_NET_CURRENT_DESKTOP'), [1, X.CurrentTime]
    )
Python: how to switch between workspaces using Xlib?