Open-source Languages & Tools for z/OS

 View Only
  • 1.  Will ctypes module be added to Python z/OS port?

    Posted 10-05-2016 05:03

    Thank you for having ported Python 2.7 on z/OS and making it available.

    I have installed it on our host machine and was able to start the interpreter.

    However, I am interested in accessing other load modules (DLLs) with Python’s foreign function interface ‘ctypes’.
    I get the following error:

    import ctypes

    Traceback (most recent call last):

    File “”, line 1, in

    File
    "/u/mm/python-2.7.6/lib/python2.7/ctypes/init.py", line 10, in

    from _ctypes import Union, Structure, Array
    

    ImportError: No module named _ctypes

    ctypes is very useful to make an ‘independent’ package available on different platforms and Python versions:

    • No need to write a Python extension to interface DLL
    • No compilations on any platform

    I am interested to support adapya on z/OS - https://pypi.python.org/pypi/adapya/0.7.0 and adapya needs some basic ctypes functionality which is available with ports to z/Linux and Windows.

    Is there a chance that you include the ctypes functionality in your Python port for z/OS?

    Will you be porting Python 3 in the future?



  • 2.  RE: Will ctypes module be added to Python z/OS port?

    Posted 10-10-2016 07:18

    Hi Mueller,

    Unfortunately ctypes module is not ported at this moment. Also I’m not sure that it will be done in nearest future.
    We have a piling on of higher priority porting jobs for Python, R, Jupyter Notebook, git and associated dependencies, packages and extensions (e.g. SparkR). However i’m not sure that the next ported version of Python will be 3 in nearest future.

    Regards,
    Andrey



  • 3.  RE: Will ctypes module be added to Python z/OS port?

    Posted 10-11-2016 09:16

    Hello,
    We have a beta pre-release of python 2.7.12 with ctypes support. If you are interested and with your permission, I will get your email address from the forum administrator and offer you the link to download the pre-release python with ctypes.
    As regards python v3, this project is planned for early 2017.
    -Peter