Top Banner
 Integrando Python com C e C++ Integrando Python com C e C++ Paulo Henrique Junqueira Amorim Desenvolvedor  Software InVesalius Ministério da Ciência e Tecnologia
35

Integrando C com Python

May 19, 2015

Download

Technology

gsroma

Paulo Henrique Junqueira Amorim
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Integrando C com Python

   

Integrando Python com C e C++Integrando Python com C e C++Paulo Henrique Junqueira Amorim

Desenvolvedor  Software InVesalius

Ministério daCiência eTecnologia

Page 2: Integrando C com Python

   

Integrando Python com C e C++

Mini Agenda                                                                                                                                      1 ­ Porque Python com C / C++ ?                        2 ­ Manualmente                                                 3 ­ CTypes                                                           4 ­ SWIG                                                                    4.1 SWIG + CMake                                        5 ­ Outras Ferramentas                                        6 ­ InVesalius                                      

Page 3: Integrando C com Python

   

Integrando Python com C e C++

1. Porque usar código em C ou C++ ?                                                                                                                                                                                                                                                       

   Desempenho

Page 4: Integrando C com Python

   

Integrando Python com C e C++

  ManualmenteManualmente

Page 5: Integrando C com Python

   

Integrando Python com C e C++

2. Manualmente

Page 6: Integrando C com Python

   

Integrando Python com C e C++

2. Manualmente

Page 7: Integrando C com Python

   

Integrando Python com C e C++

2. Manualmente

Page 8: Integrando C com Python

   

Integrando Python com C e C++

2. Manualmente

Page 9: Integrando C com Python

   

Integrando Python com C e C++

2. Manualmente

Page 10: Integrando C com Python

   

Integrando Python com C e C++

http://www.python.org/doc/ext/ext.html

http://docs.python.org/api/api.html

2. Manualmente

Page 11: Integrando C com Python

   

Integrando Python com C e C++

  CTypesCTypes

Page 12: Integrando C com Python

   

Integrando Python com C e C++

3. CTypes

Page 13: Integrando C com Python

   

Integrando Python com C e C++

3. CTypes

Page 14: Integrando C com Python

   

Integrando Python com C e C++

3. CTypes

Page 15: Integrando C com Python

   

Integrando Python com C e C++

3. CTypes

Page 16: Integrando C com Python

   

Integrando Python com C e C++

http://python.net/crew/theller/ctypes/tutorial.html

3. CTypes

Page 17: Integrando C com Python

   

Integrando Python com C e C++

  SWIGSWIG

Page 18: Integrando C com Python

   

 Integrando Python com C e C++

4. SWIGArquivo Interface

SWIGParser

Gerador Código Gerador Docum.

Python / TCL /... HTML / LaTeX

Page 19: Integrando C com Python

   

Integrando Python com C e C++

­ ­ Quem usa ?Quem usa ?

wxPythonpyOpenGL

pyOgre...

4. SWIG

Page 20: Integrando C com Python

   

Integrando Python com C e C++

­ ­ SuporteSuporte

TCLPHPLuaC#

Java...

4. SWIG

Page 21: Integrando C com Python

   

Integrando Python com C e C++

4. SWIG

Page 22: Integrando C com Python

   

Integrando Python com C e C++

4. SWIG

Page 23: Integrando C com Python

   

Integrando Python com C e C++

4. SWIG

Page 24: Integrando C com Python

   

Integrando Python com C e C++

4. SWIG

Page 25: Integrando C com Python

   

Integrando Python com C e C++

http://www.swig.org

4. SWIG

Page 26: Integrando C com Python

   

Integrando Python com C e C++

  SWIG + CMakeSWIG + CMake

Page 27: Integrando C com Python

   

Integrando Python com C e C++

4.1. SWIG + CMake

Page 28: Integrando C com Python

   

Integrando Python com C e C++

4.1. SWIG + CMake

Page 29: Integrando C com Python

   

Integrando Python com C e C++

4.1. SWIG + CMake

Page 30: Integrando C com Python

   

Integrando Python com C e C++

CompiladoresCompiladores

GCCWatcom WMake

MinGWBorland C++

Visual Studio [6:9]GCC XCode

...

4.1. SWIG + CMake

Page 31: Integrando C com Python

   

Integrando Python com C e C++

Mastering CMakeISBN 1­930934­16­5

4.1. SWIG + CMake

www.cmake.org

Page 32: Integrando C com Python

   

Integrando Python com C e C++

  Outras FerramentasOutras Ferramentas

Page 33: Integrando C com Python

   

Integrando Python com C e C++

­ Python ­ SIP­ Python ­ SIP­ Boost.Python­ Boost.Python

­ Pyrex­ Pyrex­ Cython­ Cython­ Weave­ Weave

5. Outras Ferramentas

Page 34: Integrando C com Python

   

Integrando Python com C e C++

6. InVesalius

VTK + SLICER

GDCM

ITK

Page 35: Integrando C com Python

   

Integrando Python com C e C++

Obrigado!Obrigado!

Dúvidas ?Dúvidas ?

[email protected]

Ministério daCiência eTecnologia