def sort_arguments(arguments):
        """
        @type arguments: dict
        @return: tuple
        """
        opts = {}
        posarg = {}

        for k in arguments:
            try:
                possnum = arguments[k]

                if isinstance(possnum, str):
                    possnum = possnum.replace("'", "").replace('"', '')

                    if "." in possnum:
                        arguments[k] = float(possnum)
                    else:
                        arguments[k] = int(possnum)

            except ValueError:
                pass

            key = k.replace("pa_", "").replace("op_", "").strip()

            if len(key) > 0:
                if k.startswith("pa_"):
                    posarg[k.replace("pa_", "")] = arguments[k]
                elif k.startswith("op_"):
                    opts[k.replace("op_", "")] = arguments[k]
                else:
                    posarg[k] = arguments[k]
            else:
                console("key not matched", key, color="red")

        return opts, posarg
def sort_arguments ( arguments ) : opts = { } posarg = { } for k in arguments : try : possnum = arguments [ k ] if isinstance ( possnum , str ) : possnum = possnum . replace ( "'" , "" ) . replace ( '"' , '' ) if "." in possnum : arguments [ k ] = float ( possnum ) else : arguments [ k ] = int ( possnum ) except ValueError : pass key = k . replace ( "pa_" , "" ) . replace ( "op_" , "" ) . strip ( ) if len ( key ) > 0 : if k . startswith ( "pa_" ) : posarg [ k . replace ( "pa_" , "" ) ] = arguments [ k ] elif k . startswith ( "op_" ) : opts [ k . replace ( "op_" , "" ) ] = arguments [ k ] else : posarg [ k ] = arguments [ k ] else : console ( "key not matched" , key , color = "red" ) return opts , posarg
@type arguments: dict
        @return: tuple