By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,089 Members | 2,432 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,089 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.