CkPython vs. Chilkat2-Python
Question:
Should I use CKPython or Chilkat2-Python for a new development (environment = Windows and Python 3.6)
What’s the difference between these?
Answer:
The CkPython API is the original Chilkat for Python API that uses something called SWIG (swig.org) to produce the Python wrappers around the C/C++ implementation. The result is that CkPython API has a style with more a C/C++ flavor that can be distasteful to Python developers. The Chilkat2-Python API does not use SWIG for the wrapping and results in a more natural Python API.
For example, CkPython looks like this:
imap.put_Ssl(True) imap.put_Port(993) success = imap.Connect("imap.someMailServer.com")
Whereas Chilkat2-Python looks like this:
imap.Ssl = True imap.Port = 993 success = imap.Connect("imap.someMailServer.com")
A few more notes about the differences…
- Chilkat2-Python is not available for Python 2.6 or 2.7. It is available for Python versions 3.0 (for some operating systems, such as Alpine Linux, it is available for 3.4 and up, but this is only because we suspect nobody actually needs the older versions of Python on these systems).
- Chilkat2-Python uses memoryview for passing and returning binary bytes. Coping directly with binary bytes is difficult in CkPython.
- The CkPython download contains both a “chilkat.py” and a “_chilkat.so” that are installed to the Python site-packages directory. The Chilkat2-Python download has no need for a “chilkat.py” wrapper and simply contains a “chilkat2.so” which is installed to the site-packages directory.
If starting fresh with Chilkat in Python, I would recommend using Chilkat2-Python.
admin
0
Tags :