def getStr_to_pathlist(gs):
def numize(w):<EOL><INDENT>try:<EOL><INDENT>int(w)<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>float(w)<EOL><DEDENT>except:<EOL><INDENT>return(w)<EOL><DEDENT>else:<EOL><INDENT>return(float(w))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return(int(w))<EOL><DEDENT><DEDENT>def strip_quote(w):<EOL><INDENT>if(type(w) == type('<STR_LIT>')):<EOL><INDENT>if(w[<NUM_LIT:0>]==w[-<NUM_LIT:1>]):<EOL><INDENT>if((w[<NUM_LIT:0>]=="<STR_LIT:'>") |(w[<NUM_LIT:0>]=='<STR_LIT:">')):<EOL><INDENT>return(w[<NUM_LIT:1>:-<NUM_LIT:1>])<EOL><DEDENT>else:<EOL><INDENT>return(w)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return(w)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>return(w)<EOL><DEDENT><DEDENT>gs = gs[<NUM_LIT:1>:-<NUM_LIT:1>]<EOL>pl = gs.split("<STR_LIT>")<EOL>pl = array_map(pl,numize)<EOL>pl = array_map(pl,strip_quote)<EOL>return(pl)<EOL>
gs = "[1]['1'][2]"
getStr_to_pathlist(gs)
gs = "['u']['u1']"
getStr_to_pathlist(gs)