Why are you trying to do this with python?
I see that your are working with arduino, try
processing.
It's the language that the arduino language is based upon and it has a similar editor and has some arduino libraries to make it easier for you to create applications that can work together with your arduino.