Importing C++ programs in Python

Unit 14 > Computer Science > Class 12 > Samacheer Kalvi - English Medium

Objectives


• Understand what is wrapping • Able to import C++ functions and classes in to Python programs • Create environment to work with both languages • Execute and debug Python programs

Summary


• C++ is a compiler based language while Python is an interpreter based language. • C++is compiled statically whereas Python is interpreted dynamically • A static typed language like C++ requires the programmer to explicitly tell the computer what “data type” each data value is going to use. • A dynamic typed language like Python, doesn’t require the data type to be given explicitly for the data. Python manipulate the variable based on the type of value. • A scripting language is a programming language designed for integrating and communicating with other programming languages • MinGW refers to a set of runtime header files, used in compiling and linking the code of C, C++ and FORTRAN to be run on Windows Operating System • The dot (.) operator is used to access the functions of a imported module • sys module provides access to some variables used by the interpreter and to functions that interact with the interpreter • OS module in Python provides a way of using operating system dependent functionality • The getopt module of Python helps you to parse (split) command-line options and arguments