udev rule and better python code