471,325 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

How to use the evaluate the code object returned byPyParser_Simp leParseString function?

Hi,

Can someone please help me in the following question?
On the web page http://olympus.het.brown.edu/cgi-bin...gh+Level+Layer, I got the following information:

`struct _node* PyParser_SimpleParseString(char *str, int start)'
Parse Python source code from STR using the start token START. The result can be used to create a code object which can be evaluated efficiently.
This is useful if a code fragment must be evaluated many times.

I have exactly same requirement. I have dynamic expressions loaded from database at startup in my C++ application.
I want to parse these expressions at startup & keep the parsed (compiled) code in memory of this application.
Then at runtime, I want to evaluate all this parsed code. This has to be very efficient.

So, which function should be used for evaluating the parsed code generated by PyParser_SimpleParseString?
Do I need to use the "struct _node*" returned by PyParser_SimpleParseString?

Any example of this use would be more helpful?

Thanks in advance for guidance & help.

Warm Regards,
Ganesh

================================================== ============================
Please access the attached hyperlink for an important electronic communications disclaimer:

http://www.credit-suisse.com/legal/e..._email_ib.html
================================================== ============================

Nov 14 '07 #1
0 794

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Christoph Putz | last post: by
1 post views Thread by Daveyk0 | last post: by
3 posts views Thread by josh.kuo | last post: by
52 posts views Thread by Julie | last post: by
1 post views Thread by shellon | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.