Am 05.01.2011 23:44, schrieb Rohit Coder:
I am just asking. In future I may need to import any C++ library, not a Crypto, but some other. Is it possible?
Yes.
There are at least five possible ways:

- Handcode the interface and glue code (http://docs.python.org/extending)
- use SWIG to autogenerate (mostly) the interface (http://www.swig.org)
- using BOOST's python interface (http://www.boost.org/doc/libs/1_45_0/libs/python/doc/index.html) - using ctypes module for runtime interaction (like and use it a _lot_, very cool for rapid prototyping :-) http://docs.python.org/library/ctypes.html)
- cython (different approach, implements a python subset, http://cython.org)

I used SWIG and ctypes in the past, as it seems (for me) the easiest way.

> Date: Wed, 5 Jan 2011 22:44:15 +0100
> Subject: Re: Attaching C++ libraries to Python app.
> From: stefan.sonnenb...@pythonmeister.com
> To: passionate_program...@hotmail.com
> CC: python-list@python.org
>
> You don't need to reinvent the wheel:
>
> http://www.dlitz.net/software/pycrypto/
>
> Am Mi, 5.01.2011, 22:21 schrieb Rohit Coder:
> >
> > Is it possible to use C++ libraries within a Python application? I am
> > planning to write an encryption program and want to use GnuPG C++
> > libraries.elementFontfont-familyfont-sizefont-stylefont-variantfont-weightletter-spacingline-heighttext-decorationtext-aligntext-indenttext-transformwhite-spaceword-spacingcolorBackgroundbg-attachmentbg-colorbg-imagebg-positionbg-repeatBoxwidthheightborder-topborder-rightborder-bottomborder-leftmarginpaddingmax-heightmin-heightmax-widthmin-widthoutline-coloroutline-styleoutline-widthPositioningpositiontopbottomrightleftfloatdisplayclearz-indexListlist-style-imagelist-style-typelist-style-positionTablevertical-alignborder-collapseborder-spacingcaption-sideempty-cellstable-layoutEffectstext-shadow-webkit-box-shadowborder-radiusOtheroverflowcursorvisibility
> > ...................................................Rohit. --
> > http://mail.python.org/mailman/listinfo/python-list
> >
>
>
> --
> MfG,
>
> Stefan Sonnenberg-Carstens
>
> IT Architect


    element

Font
font-family     
font-size       
font-style      
font-variant    
font-weight     
letter-spacing  
line-height     
text-decoration         
text-align      
text-indent     
text-transform  
white-space     
word-spacing    
color   
Background
bg-attachment   
bg-color        
bg-image        
bg-position     
bg-repeat       
Box
width   
height  
border-top      
border-right    
border-bottom   
border-left     
margin  
padding         
max-height      
min-height      
max-width       
min-width       
outline-color   
outline-style   
outline-width   
Positioning
position        
top     
bottom  
right   
left    
float   
display         
clear   
z-index         
List
list-style-image        
list-style-type         
list-style-position     
Table
vertical-align  
border-collapse         
border-spacing  
caption-side    
empty-cells     
table-layout    
Effects
text-shadow     
-webkit-box-shadow      
border-radius   
Other
overflow        
cursor  
visibility      

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to