def encode_argv(self, argv):
        """
        Convert an argv list into the appropiate string type depending
        on the currently used python version.
        """
        if PY3:
            # we need unicode argv
            argv = [c if isinstance(c, text_type) else c.decode("utf-8") for c in argv]
        else:
            # we need bytestring argv
            argv = [c if isinstance(c, binary_type) else c.encode("utf-8") for c in argv]
        return argv

        Convert an argv list into the appropiate string type depending
        on the currently used python version.
        
system/shruntime.py