Python-Extensions with Other Languages (2024)

Motivation

Python can be readily connected with other languages.This way, existing libraries in other languages can be used.

Programming in Python is rather comfortable and efficient.The speed of Python programs for some tasks is considerablyslower than for programs in other languages such as C/C++, C#,Java, or FORTRAN.As a solution slow program parts can be reimplemented inother languages and seamlessly incorporated in Python.

Furthermore, Python is often termed “glue languages” becauseof its ability to connected very different systems. The connectionof libraries and programs that are implemented in other languagesplays a important role for this ability.

Course Content

Introduction to Example

We use a computationally intensive example throughout the course.This allows for comparison of the different extension methods.

Use of Python’s C-API

Standard Python is implemented in C and offers a comprehensiveAPI for writing extensions.The basics of this API are taught. A working extension willbe developed by hand that can be used by a Python program.

Python Extensions with Pyrex/Cython

Pyrex is a special language for writing Python extensions.It has mainly Python syntax with some limitations and some additionsthat allow for automatic translation into C code suitableto be compiled in an Python extension.Examples are used to show how Pyrex works. The possibilities ofincorporating existing C programs are also explained.

Use of DLLs with ctypes

The package ctypes allows to access DLLs or shared libraries from Python.It works on the operating systems Windows, Windows CE, Mac OS X, Linux,Solaris, FreeBSD, and OpenBSD. The language in which the DLL is implementeddoesn’t matter.The usage of ctypes is introduced with examples. Under Windows Microsoft’s.NET compiler und the mingw (gcc) compiler are used to compile the DLL.The shared library under Linux Linux is compiled with the gcc.One focus is type conversion between Python and the DLL.

Automatic generation of Extensions with SWIG

The “Simplified Wrapper and Interface Generator” (SWIG) allowsto make C/C++ libraries accessible from 13 different languages.One of them is Python. The way SWIG works is covered usingexamples in C as well as in C++.

Jython

Jython is an implementation of Python in Java. It allows to accessJava classes directly.The course covers the basics of Jython programs. Examplesfor use of existing Java classes as well as self written classesare used.

IronPython

IronPython is a implementation of Python in .NET. It allowsAccess to all .NET features and makes it a first class .NETlanguage right next to C# and Visual Basic.The course introduces IronPython, demonstrates how to use.NET assemblies, and how access self written C# classes.

Use of FORTRAN Subroutines from Python

FORTRAN is one of the oldest programming languages but itis still in heavy use for scientific applications dueto its high performance.There are many old but well proven numerical librariesthat can be used from Python.

The usage of F2PY to connect FORTRAN77 as well as FORTRAN90/95programs with Python is demonstrated. One focus are object-orientedinterfaces to those libraries.

Exercises

The participants can follow all steps directly on their computers.There are exercises at the end of each unit providing ampleopportunity to apply the freshly learned knowledge.

Course Material

Every participant receives comprehensive materials in PDF formatthat cover the whole course contentas well as all source code.

Recommended Module Combinations

The module Optimizing Python Programs covers supplementary topics.The course Python for Scientists and Engineers might also be of interest.

The course may be combined with the coursePython for Non-Programmersor Python for Programmers.

Python-Extensions with Other Languages (2024)
Top Articles
What is another word for zenith? | Zenith Synonyms - WordHippo Thesaurus
Major Ethereum Mining Pools Will Back ETHW Mining - Decrypt
Tlc Africa Deaths 2021
Dricxzyoki
Farepay Login
Beacon Schnider
Google Sites Classroom 6X
Holly Ranch Aussie Farm
THE 10 BEST River Retreats for 2024/2025
Amateur Lesbian Spanking
Stream UFC Videos on Watch ESPN - ESPN
Iron Drop Cafe
Brutál jó vegán torta! – Kókusz-málna-csoki trió
Rapv Springfield Ma
Persona 4 Golden Taotie Fusion Calculator
Marion County Wv Tax Maps
Missed Connections Dayton Ohio
Divina Rapsing
Wausau Obits Legacy
Vintage Stock Edmond Ok
3476405416
Beryl forecast to become an 'extremely dangerous' Category 4 hurricane
Robert Deshawn Swonger Net Worth
Bible Gateway passage: Revelation 3 - New Living Translation
Https Paperlesspay Talx Com Boydgaming
Chase Bank Pensacola Fl
Certain Red Dye Nyt Crossword
Jordan Poyer Wiki
Sandals Travel Agent Login
Myql Loan Login
Ice Dodo Unblocked 76
Korg Forums :: View topic
Dubois County Barter Page
Frommer's Belgium, Holland and Luxembourg (Frommer's Complete Guides) - PDF Free Download
Ultra Clear Epoxy Instructions
T&J Agnes Theaters
Pensacola 311 Citizen Support | City of Pensacola, Florida Official Website
Go Upstate Mugshots Gaffney Sc
New Gold Lee
Sephora Planet Hollywood
159R Bus Schedule Pdf
Review: T-Mobile's Unlimited 4G voor Thuis | Consumentenbond
PruittHealth hiring Certified Nursing Assistant - Third Shift in Augusta, GA | LinkedIn
Directions To The Closest Auto Parts Store
Promo Code Blackout Bingo 2023
Random Animal Hybrid Generator Wheel
Tacos Diego Hugoton Ks
Hy-Vee, Inc. hiring Market Grille Express Assistant Department Manager in New Hope, MN | LinkedIn
Uncle Pete's Wheeling Wv Menu
Craigslist.raleigh
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 6444

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.