cleaning (and py3 branch compat) around clipboard