Pyserial and Arduino every Time new Connect problem
I strongly suggest you separate connecting from communication. Do not forget you should execute a closing when the connection is not needed anymore.

Basically you need this three operations in this order over multiple frames:


establish a connection
communicate (receive/send) via connection
close connection [which seams not to apply at serial)


I suggest to implement it that way:

import serial
import bge

INTERNAL_PROPERTY_CONNECTION = "_connection"

listener = bge.logic.getCurrentController().owner

connection = listener.get(INTERNAL_PROPERTY_CONNECTION)
if not connection:
    connection = serial.Serial('COM6',9600, timeout=0)
    listener[INTERNAL_PROPERTY_CONNECTION] = connection

# your communciation
a = int(connection.readline().strip())
cube = bge.logic.getCurrentScene().objects["Cube"]
cube.worldPosition.x = a