Basic Boost.Python Question

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

    #1

    Basic Boost.Python Question

    Hi,

    I have been working in getting Boost.Python running on my PC, seems to
    work now.
    I have what I believe is somewhat of basic question here.
    I am starting on an application that will developed in VS2005, probably
    using C++/CLI.
    I want to be able to exchange data in between Python and C++. The user
    when running the C++ app will be able to call a python script, set
    some values, that will then be communicated to running application, it
    will have to run the python code, and send some data to the
    applicationfrom Python to vary the performance. And probably the C++
    end will have to call a python script and pass some data to it.
    So, is Boost.Python the way to go here or is there something else that
    will accomplish this?

    Thanks for your help
    Jeff

  • Pierre Barbier de Reuille

    #2
    Re: Basic Boost.Python Question

    Hoop wrote:
    Hi,
    >
    I have been working in getting Boost.Python running on my PC, seems to
    work now.
    I have what I believe is somewhat of basic question here.
    I am starting on an application that will developed in VS2005, probably
    using C++/CLI.
    I want to be able to exchange data in between Python and C++. The user
    when running the C++ app will be able to call a python script, set
    some values, that will then be communicated to running application, it
    will have to run the python code, and send some data to the
    applicationfrom Python to vary the performance. And probably the C++
    end will have to call a python script and pass some data to it.
    So, is Boost.Python the way to go here or is there something else that
    will accomplish this?
    Boost.Python is certainly a (good) way to do it ! I go as far as
    including a Python shell to allow two-way interactions with the objects
    loaded in the C++ GUI of my app ... Look at the tutorial, mostly here:



    To know how to use Python from a C++ application. But I warn you: it is
    much simpler the other way around, i.e. having a Python app' calling
    some C++ code to make some parts quicker (or call already existing libs).

    Pierre
    >
    Thanks for your help
    Jeff
    >

    Comment

    • Neil Hodgson

      #3
      Re: Basic Boost.Python Question

      Hoop:
      I am starting on an application that will developed in VS2005, probably
      using C++/CLI.
      I haven't heard any reports of Boost.Python code being compatible
      with C++/CLI so you may need to add an adaptation layer. To run inside
      ..NET, I'd choose IronPython.

      Neil

      Comment

      • Hoop

        #4
        Re: Basic Boost.Python Question

        Hi Neil,
        I have never heard of IronPython. Do you know if you can embedd the
        Python interpreter ?
        Thanks
        Jeff

        Neil Hodgson wrote:
        Hoop:
        >
        I am starting on an application that will developed in VS2005, probably
        using C++/CLI.
        >
        I haven't heard any reports of Boost.Python code being compatible
        with C++/CLI so you may need to add an adaptation layer. To run inside
        .NET, I'd choose IronPython.
        >
        Neil

        Comment

        • Neil Hodgson

          #5
          Re: Basic Boost.Python Question

          Hoop:
          I have never heard of IronPython. Do you know if you can embedd the
          Python interpreter ?
          I think so as I've read of people embedding the console on the
          mailing list. My experience is in using a C# library within a Python
          application.

          Neil

          Comment

          Working...