Embedded Python

J

John Dean

Hi
Is it possible to execute a whole script using the C API function
PyRun_String? At moment I load the script into a buffer. Then I get each
line of the script and pass it PyRun_String. This seems very inefficient. It
would be more efficient if I could pass the complete string buffer to
PyRun_String and execute the script as a whole
 
F

Fredrik Lundh

John said:
Is it possible to execute a whole script using the C API function
PyRun_String? At moment I load the script into a buffer. Then I get each
line of the script and pass it PyRun_String. This seems very inefficient. It
would be more efficient if I could pass the complete string buffer to
PyRun_String and execute the script as a whole

so why don't you try it? ;-)

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,289
Messages
2,571,448
Members
48,126
Latest member
ToneyChun2

Latest Threads

Top