[Tutor] c++ on python

Gabriele Brambilla gb.gabrielebrambilla at gmail.com
Tue Mar 11 15:27:57 CET 2014


I answer in the text

2014-03-11 9:32 GMT-04:00 ALAN GAULD <alan.gauld at btinternet.com>:

> CC'ing the list
> Please use ReplyAll when responding.
>
>
>   ------------------------------
>  *From:* Gabriele Brambilla <gb.gabrielebrambilla at gmail.com>
> *To:* Alan Gauld <alan.gauld at btinternet.com>
> *Sent:* Tuesday, 11 March 2014, 12:54
> *Subject:* Re: [Tutor] c++ on python
>
> I think (because I've not received the code yet) I will receive the source
> code (.c or .cpp file)
> and I want to compile it in the way to use it and maybe make small
> changes. So I think I want
> to embed the code as a Python module (but it's not properly a library).
>
> What is your experience level with C/C++?
>
Are you familiar with building C/C++ libraries or even object files?
>

I know C/C++, I am not able to do everything but I think that I can compile
a simple programm with object files and libraries


> There are documents and tools to help you turn C code into Python
> libraries
> but that's really outside the scope of the tutor list.
>
> About the dependencies I am not so sure as before.
> So I mistaken the list? which one is the right one?
>
> I suspect you may want a different list. But you will need to be clear
> about what you are
> trying to do. It's still not clear what exactly this source code will be.
> Is it a library or a program?
>

A program. it should use only standard C++ libraries.


> Do you think is it better that I install a C compiler and I don't use
> python? I use Anaconda...
>
> You will need a C compiler regardless, if you receive C source code.
> Python cannot work with C in source format, only after it is compiled.
> But that does not mean you can't use Python to work with it, and that is
> probably easier than trying to write your whole application in
> C++ - especially if you are not already fluent in C++.
>

Yes I would prefer to use Python as much as possible.
What do you mean about using Python to work with it? How do you usually do?


I've no experience of Anaconda but it looks like it might be hard to find
> an equivalent
> in the C++ world, especially if you have already written a lot of
> Python/Anaconda code.
>
> Alan Gauld
> Author of the Learn To Program website
> http://www.alan-g.me.uk/
> http://www.flickr.com/photos/alangauldphotos
>

Thanks

Gabriele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140311/de5964af/attachment.html>


More information about the Tutor mailing list