Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old April 10th, 2006, 10:25 AM
Andrew McCall
Guest
 
Posts: n/a
Default Giving your C/C++ Application a Python Command Line...

Hi Folks,

I am building an application under multiple OS's, and I wanted to give
my application

For example, the test application I am working on is a calculator and I
would like to have a menu in the GUI option to open a command line
where you can use Python commands to perfom the functions of the
application within the Python command line. For example, if I wanted
to clear the display or display the about screen I would be able type
the command in the Python coimmand line. To do this I think I need to
embed Python in my application, and then expose my C/C++ functions to
Python.

I have read the documents on embedding Python and I can give my
application a command line, but I am having issues exposing my C/C++
functions to Python.

Does anyone know of any tutorials or example code that show how to do
this?

Thanks,

Andrew McCall

  #2  
Old April 10th, 2006, 10:45 AM
Roman Yakovenko
Guest
 
Posts: n/a
Default Re: Giving your C/C++ Application a Python Command Line...

On 10 Apr 2006 02:15:41 -0700, Andrew McCall <andrew.mccall@gmail.com> wrote:[color=blue]
> Hi Folks,
>
> I am building an application under multiple OS's, and I wanted to give
> my application
>
> For example, the test application I am working on is a calculator and I
> would like to have a menu in the GUI option to open a command line
> where you can use Python commands to perfom the functions of the
> application within the Python command line. For example, if I wanted
> to clear the display or display the about screen I would be able type
> the command in the Python coimmand line. To do this I think I need to
> embed Python in my application, and then expose my C/C++ functions to
> Python.
>
> I have read the documents on embedding Python and I can give my
> application a command line, but I am having issues exposing my C/C++
> functions to Python.
>
> Does anyone know of any tutorials or example code that show how to do
> this?[/color]

You have few choices:

boost.python
http://boost.org/libs/python/doc/tut...embedding.html

PyCXX ( embedding only )
http://cxx.sourceforge.net/
[color=blue]
> Thanks,
>
> Andrew McCall
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>[/color]


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles