I am not a Python programmer, but this week I had a discussion with a Python programmer about the using of actual SAP NetWeaver RFC library with Python. He told me, that he uses the library pysaprfc, which bases on the classic librfc32.dll. So I am a little bit surprised about his decision, because on the one hand Python offers via ctypes a complete interface to use the actual SAP NetWeaver RFC library. On the other hand is the classic RFC library (a little bit) outdated, e.g. it doesn't supports all data types - look here in the ActiveX context. I am searching in the internet and I am surprised again, I can't find an example snippet or something else. This was my launch to create the following examples.
The first example shows how to connect an SAP system:
As you can see I am a newbie in Python, but I think this snippets are a good precondition to intensify the using of actual SAP NetWeaver RFC library with Python directly. I developed this examples with the actual Python version 3.4.1, in an Windows environment with the actual SAP NetWeaver RFC library 720 PL24.
2015/09/16: Three days ago the new Python release 3.5.0 has been published. The method above works perfect with the new release.
2017/04/24: I check the method above with Python release 3.6.1 x64 and with the SAP NetWeaver RFC library 721 PL42 x64 and it works perfect.