c/c++ and python

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

    #1

    c/c++ and python

    Hi to all!
    I have a little problem. I want to develop an application in c/c++ that
    creates a window with gtk+ accordinly to the information on a xml file.
    The funcions that are called for manage the event should be written in
    python. I don't know how to do it, can you help me? Is it possible?
    Thanks a lot!

  • Alessandro Bottoni

    #2
    Re: c/c++ and python

    Mattia Adami wrote:
    [color=blue]
    > Hi to all!
    > I have a little problem. I want to develop an application in c/c++ that
    > creates a window with gtk+ accordinly to the information on a xml file.
    > The funcions that are called for manage the event should be written in
    > python. I don't know how to do it, can you help me? Is it possible?
    > Thanks a lot![/color]

    Yes, it is possible. Most likely, you will have to embed a Python
    interpreter in your app. Have a look at the Extending&Embed ding section of
    the Python manual.

    As an alternative, you can use your C++ code as an extension of Python (a
    module). Again, have a look at the Extending&Embed ding section of the
    Python manual.

    BTW: are you aware of the existence of PyGTK and wxPython?

    HTH
    -----------------------------------
    Alessandro Bottoni

    Comment

    • Mattia Adami

      #3
      Re: c/c++ and python

      Thanks a lot, very clear and usefull anser!

      Yes, I know PyGTK and wxPython, but I want to develop a plugin for
      another application that requires c++. I guess that embedding is the
      appropriate way.

      Thanks.

      Comment

      Working...