HOWTO : Py_CompileString !?!?!
Denis S. Otkidach
ods at strana.ru
Thu Jan 30 10:03:24 EST 2003
On Thu, 30 Jan 2003, Luc wrote:
L> Here is the script in question :
L>
L> import FOMath
L> #FOMath has a method called PointValue()
L> def test():
L> print FOMath.PointdddValue()
L>
L> test()
L>
L> This should't compile because a syntax error is present...
There is no syntaz error in your example. Try "dddprint"
instead.
L>
L> The way I compile the code from C++ is done like so :
L>
L> //str contains the file that just loaded...
L> Py_CompileString((char*)str.c_str(), "<test.py>",
L> Py_file_input);
L>
L> That's it. It's the way I tought was proper. Might be wrong,
L> that's why
L> I posted in this group :)
L>
L> Cheers, Luc.
L>
L>
--
Denis S. Otkidach
http://www.python.ru/ [ru]
More information about the Python-list
mailing list