Re: best way to parse a function-call-like string?

2009-03-03 Thread mh
Paul McGuire wrote: > Pyparsing will easily carve up these function declarations, and will I didn't know about this module, it looks like what I was looking for... Thanks!!! -- Mark Harrison Pixar Animation Studios -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to parse a function-call-like string?

2009-02-26 Thread Paul McGuire
On Feb 26, 3:29 pm, m...@pixar.com wrote: > I have some strings that look like function calls, e.g. > >         "junkpkg.f1" >         "junkpkg.f1()" >         "junkpkg.f1('aaa')" >         "junkpkg.f1('aaa','bbb')" >         "junkpkg.f1('aaa','bbb','ccc')" >         "junkpkg.f1('aaa','with,comma')

Re: best way to parse a function-call-like string?

2009-02-26 Thread John Machin
On Feb 27, 8:29 am, m...@pixar.com wrote: > I have some strings that look like function calls, e.g. > >         "junkpkg.f1" >         "junkpkg.f1()" >         "junkpkg.f1('aaa')" >         "junkpkg.f1('aaa','bbb')" >         "junkpkg.f1('aaa','bbb','ccc')" >         "junkpkg.f1('aaa','with,comma')

Re: best way to parse a function-call-like string?

2009-02-26 Thread mh
Robert Kern wrote: > On 2009-02-26 15:29, m...@pixar.com wrote: > Use the compiler module to generate an AST and walk it. That's the real > way. For me, that would also be the quick way because I am familiar with > the API, but it may take you a little bit of time to get used to it. ah, that's

Re: best way to parse a function-call-like string?

2009-02-26 Thread Robert Kern
On 2009-02-26 15:29, m...@pixar.com wrote: I have some strings that look like function calls, e.g. "junkpkg.f1" "junkpkg.f1()" "junkpkg.f1('aaa')" "junkpkg.f1('aaa','bbb')" "junkpkg.f1('aaa','bbb','ccc')" "junkpkg.f1('aaa','with,comma')" and I nee

Re: best way to parse a function-call-like string?

2009-02-26 Thread Tim Wintle
On Thu, 2009-02-26 at 21:39 +, Tim Wintle wrote: > On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote: > > "junkpkg.f1", ['aaa','with,comma'] oops - missed this one, ignore my last reply. -- http://mail.python.org/mailman/listinfo/python-list

Re: best way to parse a function-call-like string?

2009-02-26 Thread Tim Wintle
On Thu, 2009-02-26 at 21:29 +, m...@pixar.com wrote: > I have some strings that look like function calls, e.g. > > "junkpkg.f1" > "junkpkg.f1()" > "junkpkg.f1('aaa')" > "junkpkg.f1('aaa','bbb')" > "junkpkg.f1('aaa','bbb','ccc')" > "junkpkg.f1('aaa','with,comma')" > > and I need to split them

best way to parse a function-call-like string?

2009-02-26 Thread mh
I have some strings that look like function calls, e.g. "junkpkg.f1" "junkpkg.f1()" "junkpkg.f1('aaa')" "junkpkg.f1('aaa','bbb')" "junkpkg.f1('aaa','bbb','ccc')" "junkpkg.f1('aaa','with,comma')" and I need to split them into the function name and li