Embedded Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Dean

    #1

    Embedded Python

    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

    --
    Best Regards
    John
  • Fredrik Lundh

    #2
    Re: Embedded Python

    John Dean wrote:
    [color=blue]
    > 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[/color]

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

    </F>



    Comment

    Working...