HOWTO : Py_CompileString !?!?!

Luc acid_til at yahoo.com
Wed Jan 29 14:43:38 EST 2003


Hello fellow python user :)

I'm quite new to this so please be kind to my newbie question !!!

I'm trying to embed python in my C++ application. I have a python source 
file names test.py and what I want to do is first try to compile it to 
see if any syntax error or import error occurs.  I tried to use 
Py_CompileString but it seems not to work. I added a syntax error and it 
still report no error. Now I just thought that because it's interpreted, 
does it mean that the error is caught until the script is actually run 
??? If so, is there any method that I could use to detect such error 
without resorting to running the script ???

Thanks in advance for any help.

Luc.





More information about the Python-list mailing list