Python Function Define Input Devices