{ "info": { "author": "Novimir Antoniuk Pablant", "author_email": "novimir.pablant@amicitas.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Cython", "Programming Language :: Other", "Programming Language :: Python", "Topic :: Software Development :: Interpreters" ], "description": "********\nmirpyidl\n********\n\n\nA library to call IDL (Interactive Data Language) from python. Allows trasparent wrapping of IDL routines and objects as well as arbitrary execution of IDL code. \n\n*mirpyidl* requires a licenced installation of IDL . Data is transfered back and forth using either the CallableIDL (idl_export.h) or the IDLRPC (idl_rpc.h) APIs, both of which are distrbuted with IDL. \n\nAll standard IDL and python/numpy datatypes are supported, and *mirpyidl* transparently handles translating between equivilent datatypes. This includes translation between IDL structures and python dictionaries.\n\n*mirpyidl* is hosted at: \n https://bitbucket.org/amicitas/mirpyidl\n\nDocumentation can be found at:\n http://amicitas.bitbucket.io/mirpyidl\n\n\n*mirpyidl* was written by Novimir A. Pablant, and is released under an MIT licence.\n\n\nDependencies\n============\n\n- IDL (8.0 or later)\n- python (2.7, 3.0 or later)\n\n * numpy\n * psutil\n\n- cython\n- openmotif\n\n*mirpyidl* requires a licenced installation of IDL. Currently only IDL 8.0 or later is spported due to the additon of the ``HASH`` and ``LIST`` types. Older versions may be compatible but are untested.\n\n\n*mirpyidl* is currently only supported on linux and OS X. It should also work fine on windows, but the ``setup.py`` script has not been setup to find the IDL installation directory. If you want to give this a try on windows, just add the appropriate directories to setup.py. (If it works submit a pull reqeust so that I can update the public package.)\n\n\nInstallation\n============\n\n*mirpyidl* can be installed from pypi.python.org using pip::\n\n pip install mirpyidl\n\nAlternatively *mirpyidl* can be alse be installed from source using the following command::\n \n python setup.py install\n\nTo do a user-local installaiton (which does not required root privalages) add the ``--user`` flag to the installation command. For more control over the installation, all standard ``distutils`` commands are available. If ``setuputils`` is installed, then the extended commands will also work.\n\n\nIf only a local copy is desired, rather than a full installation, the *mirpyidl* module can be built in place using::\n\n python setup.py build_ext --inplace\n\nThis will build *mirpyidl* in place and create the ``mirpyidl.so`` shared library and ``mirpyidlrpc.py`` module both of which can then be imported from python.\n\n\nWarning:\n On Mac OS X the setup script will change the installation names of the libidl.dylib, libidl_rpc.dylib and related IDL libraries to be prefixed with ``@rpath/``. This is the OS X standard way to specify run-path dependent libraries and is not known to have any side effects.\n\nNote:\n Compilation with ``gcc`` should generally work without any issues. Compilation with the intel compiler, ``icc`` is also possible, however the intel linker will also need to be used. For compilation with ``icc`` make sure to set the following environmental variables: ``CC='icc -pthread'`` and ``LDSHARED='icc -pthread -shared'``.\n\nExamples\n========\n\nHere are a few simple examples. A full set of examples and tutorials is included in the documentation.\n\n\nexecuting idl code\n------------------\n\nHere is a simple example for executing arbitrary IDL code from python:\n\n.. code-block:: python\n\n # Import mirpyidl.\n import mirpyidl as idl\n\n # Execute a command in IDL.\n # This will print 'Hello mom!' from IDL.\n idl.execute(\"PRINT, 'Hello mom!'\")\n\n\nAs a more complex example, we will now send some data back and forth between IDL and python.\n\n.. code-block:: python\n\n import numpy as np\n import mirpyidl as idl\n\n # Create a numpy array in python.\n py_array = np.random.normal(size=1000)\n\n # Copy this data to IDL.\n idl.setVariable('idl_array', py_array)\n\n # Calculate the standard devation and the mean in IDL.\n idl.execute('idl_stddev = STDDEV(idl_array)')\n idl.execute('idl_mean = MEAN(idl_array)')\n\n # Copy the results back to python.\n py_stddev = idl.getVariable('idl_stddev')\n py_mean = idl.getVariable('idl_mean')\n\n # Print out the results.\n print('Mean: {}, StdDev: {}'.format(py_mean, py_stddev))\n\n \ncalling functions and procedures\n--------------------------------\n\nIn the examples above we used just the most basic mirpyidl commands to control an IDL session and pass data between IDL and python. In these next examples we use the *mirpyidl* wrapping routines to do simplify the code in the previous example significantly.\n\n\n.. code-block:: python\n\n import numpy as np\n import mirpyidl as idl\n\n # Create a numpy array in python.\n py_array = np.random.normal(size=1000)\n\n # Calculate the standard devication and mean using IDL.\n py_stddev = idl.callFunction('STDDEV', [py_array])\n py_mean = idl.callFunction('MEAN', [py_array])\n\n # Print out the results.\n print('Mean: {}, StdDev: {}'.format(py_mean, py_stddev))\n\n\nwraping functions and procedures\n--------------------------------\n\nWrapping functions or procedures looks very similar to the example above. Let say we want to wrap the IDL ``STDDEV`` and ``MEAN`` functions in a python module named ``idlmath``.\n\n\n.. code-block:: python\n\n # idlmath.py\n\n import mirpyidl as idl\n\n def stddev(*args, **kwargs):\n return idl.callFunction('STDDEV', args, kwargs)\n\n def mean(*args, **kwargs):\n return idl.callFunction('MEAN', args, kwargs)\n\nThat's all there is to it. Now we can call these functions as though they were native python funcitons.\n\n.. code-block:: python\n\n import numpy as np\n import idlmath\n\n array = np.random.normal(size=1000)\n\n # Here we transparently call the wrapped IDL functions.\n mean = idlmath.mean(array)\n stddev = idlmath.stddev(array)\n\n\nwrapping objects\n----------------\n\n*mirpyidl* also has the ability to fully wrap IDL objects.\n \nPython wrapping objects should all inherit from PyIDLObject. Here is an example of wrapping a hypothetical Gaussian object.\n\n.. code-block:: python\n\n # _IdlGaussain.py\n\n from mirpyidl import PyIDLObject\n\n class IdlGaussian(PyIDLObject):\n\n # Define the the IDL command needed to create the object.\n _creation_command = \"OBJ_NEW\"\n _creation_params = ['GAUSSIAN']\n _creation_keywords = None \n\n def evaluate(self, *args, **kwargs):\n return, self.callMethodFunction('EVALUATE', args, kwargs)\n\n def setParam(self, *args, **kwargs):\n return, self.callMethodPro('SET_PARAM', args, kwargs)\n\n def getParam(self, *args, **kwargs):\n return, self.callMethodFunction('GET_PARAM', args, kwargs)\n\n\nThis wrapped object can now be used just like a normal Python object.\n\n.. code-block:: python\n\n from _IdlGaussian import IdlGaussian\n\n obj = IdlGaussian()\n obj.setParam(location=0.0, width=1.0, area=1.0)\n\n y = obj.evaluate(0.0)\n\n\nUsing an idlrpc server\n======================\n\n*mirpyidl* can also connect to a running ``idlrpc`` instance rather than starting an IDL interpreter internally. To use an idlrpc connection simply use ``import mirpyidl`` instead of ``import mirpyidlrpc``. All of the examples above will work equivalently with this change.\n\n.. code-block:: python\n\n # Import mirpyidlrpc to use the idlrpc interface.\n import mirpyidlrpc\n\n # We can also import individual classes as before.\n from mirpyidlrpc import PyIdl\n\n\nAdvanced usage can be found in the documentation.\n\nWhen using the idlrpc interface an ``idlrpc`` server will need to be started in a separate process. This can be done using the following command (which is part of any standard IDL installation)::\n\n idlrpc", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://amicitas.bitbucket.org/mirpyidl/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "mirpyidl", "package_url": "https://pypi.org/project/mirpyidl/", "platform": "", "project_url": "https://pypi.org/project/mirpyidl/", "project_urls": { "Homepage": "http://amicitas.bitbucket.org/mirpyidl/" }, "release_url": "https://pypi.org/project/mirpyidl/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "A library to call IDL (Interactive Data Language) from python.", "version": "0.4.1" }, "last_serial": 4836152, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "55df8d2e0d4e4868a526da1797281c5b", "sha256": "2a780f7891bdc1de479b6d35bc602f4d3d5fb341d6e3a06622593b70f45debc1" }, "downloads": -1, "filename": "mirpyidl-0.2.0.6.tar.gz", "has_sig": false, "md5_digest": "55df8d2e0d4e4868a526da1797281c5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 142797, "upload_time": "2015-07-06T20:28:42", "url": "https://files.pythonhosted.org/packages/22/6f/c660390463aed3563d8aae89800af332563ace2e71afc12698f450dfb3f9/mirpyidl-0.2.0.6.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e0cbf7b0cd9f9bffae258bbcdb85ab35", "sha256": "69a615eca1b7f5fc13bc5a5a54aee92a0550b47e22a45650f29ad41319bcfe34" }, "downloads": -1, "filename": "mirpyidl-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e0cbf7b0cd9f9bffae258bbcdb85ab35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 150718, "upload_time": "2015-07-14T23:30:57", "url": "https://files.pythonhosted.org/packages/ad/53/73cfe00a285e334ca45a31074daea0a4298594d6e4d7839687bb6b9b3767/mirpyidl-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "79c69d25d00f1a490b6423c4c1f2025e", "sha256": "4c77641126f7dab0d999b05e0c1e3c8219e01be730ca2daf91181bdf5f21ee11" }, "downloads": -1, "filename": "mirpyidl-0.2.2.tar.gz", "has_sig": false, "md5_digest": "79c69d25d00f1a490b6423c4c1f2025e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 151851, "upload_time": "2015-07-15T05:54:55", "url": "https://files.pythonhosted.org/packages/14/d0/a0b265ad504a12ccc4add1606af9a568b133683ffd15dd25b08504fd11fb/mirpyidl-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "a48862b59be0844266aba0c63a433584", "sha256": "3e3eeb5a7e4a1174552da45907a6747a2b5f0f1c00e9d3b155851569cf8be021" }, "downloads": -1, "filename": "mirpyidl-0.2.3.tar.gz", "has_sig": false, "md5_digest": "a48862b59be0844266aba0c63a433584", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153082, "upload_time": "2015-07-15T16:41:12", "url": "https://files.pythonhosted.org/packages/46/03/bb9c0f09808b42d26f95fc345a18d73c6130fd3e403b259d9b239fb0fae0/mirpyidl-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "fc5753b86e553afbc08e16853d47883f", "sha256": "270d210c8140c63490c59ed84d1ed3d9e85820ff988416cb61bd2b451d326eb7" }, "downloads": -1, "filename": "mirpyidl-0.2.4.tar.gz", "has_sig": false, "md5_digest": "fc5753b86e553afbc08e16853d47883f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153503, "upload_time": "2016-01-12T15:23:00", "url": "https://files.pythonhosted.org/packages/81/2d/291991b5e1a30cc66e008cf62f1d9674db3fbce127eae4ecaaa2e1a9b18a/mirpyidl-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "f6207c97077b3b45b2aff72ce2fe4867", "sha256": "306a775b87772a0a6424a482289d8d8e1854ba88e8398729d85e255ff1dc2397" }, "downloads": -1, "filename": "mirpyidl-0.2.5.tar.gz", "has_sig": false, "md5_digest": "f6207c97077b3b45b2aff72ce2fe4867", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 153735, "upload_time": "2016-01-30T17:58:58", "url": "https://files.pythonhosted.org/packages/71/7b/41df41e3f1b1925099831246f98ba2c8f69c402aaae89a24dc01d691a989/mirpyidl-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "82b586e10722575f143b104c0bf27ea2", "sha256": "870e4660b0ba929e8e72270f794c9f1732f23159a58cdd275dfecf52e22303cc" }, "downloads": -1, "filename": "mirpyidl-0.2.6.tar.gz", "has_sig": false, "md5_digest": "82b586e10722575f143b104c0bf27ea2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160718, "upload_time": "2016-02-04T07:22:09", "url": "https://files.pythonhosted.org/packages/d3/a4/fd70b064f402b0d16d795f98478efa30850c015b9b8f8eeae8cdb77ac33d/mirpyidl-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "5c1bcbbc42b0518030ebe02924f913ed", "sha256": "d2d3129010dcc1b5eb98bc00f881476685ca6947d751f4aefb5c5282ac0d0d41" }, "downloads": -1, "filename": "mirpyidl-0.2.7.tar.gz", "has_sig": false, "md5_digest": "5c1bcbbc42b0518030ebe02924f913ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 160824, "upload_time": "2016-05-17T12:15:21", "url": "https://files.pythonhosted.org/packages/3b/c9/775b44799cb25c4cc245d86d1819eb793e02b265730c336f2dec8108fff1/mirpyidl-0.2.7.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7c189bc688c11e0844e6361939a3f570", "sha256": "a746dda2b02c6c48da2eb7663592805cc27e59f7b04e1363e8f2944db6e0c075" }, "downloads": -1, "filename": "mirpyidl-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7c189bc688c11e0844e6361939a3f570", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 173031, "upload_time": "2017-07-10T20:54:44", "url": "https://files.pythonhosted.org/packages/0f/b8/1dfa32b4944ae51e6c08ce09d65da63ce0d25283f0abaf8931036908ea9e/mirpyidl-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "07eb67355a228feb3acebdee4a7dd319", "sha256": "4f39eb65630f701899f34ea064eedd0f8df22c87c164cfe1522f7346c87f370b" }, "downloads": -1, "filename": "mirpyidl-0.3.1.tar.gz", "has_sig": false, "md5_digest": "07eb67355a228feb3acebdee4a7dd319", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34031, "upload_time": "2018-11-21T15:30:43", "url": "https://files.pythonhosted.org/packages/9c/53/679efbfabcb3d64e1e3bc3914a79099a8bd243eb5cecb0bfa67170796743/mirpyidl-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "c362f2b19226f7c081c09cf036df3539", "sha256": "4d759185b13cfb2033a43f6d7005b2ec9c487e332574488b86f8f22c7ed103e7" }, "downloads": -1, "filename": "mirpyidl-0.3.2.tar.gz", "has_sig": false, "md5_digest": "c362f2b19226f7c081c09cf036df3539", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34128, "upload_time": "2018-11-21T15:55:34", "url": "https://files.pythonhosted.org/packages/58/94/86e90648789b89391ec377e250ef1ed38706c6c7d30b9dc655a1adef042f/mirpyidl-0.3.2.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "848b64b6f4b43d4ecd4fe11ddd0bca49", "sha256": "a754a1e06cfbc5bd52ffeb8f0f3a34230a78b65c0869c25d71c58da463db40e9" }, "downloads": -1, "filename": "mirpyidl-0.4.0.tar.gz", "has_sig": false, "md5_digest": "848b64b6f4b43d4ecd4fe11ddd0bca49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34590, "upload_time": "2018-11-22T16:04:50", "url": "https://files.pythonhosted.org/packages/9c/30/7c37253a3fe96b67bbb02ca58ea445a8d3ac1669980bda4ae4da70aad70d/mirpyidl-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "37396446dee79ddb752c60d14d73f5e8", "sha256": "5fce2a7f3c5a22099770d1eed4b4aac94751f6a74a6cb13c8c15dc9c567b14e3" }, "downloads": -1, "filename": "mirpyidl-0.4.1.tar.gz", "has_sig": false, "md5_digest": "37396446dee79ddb752c60d14d73f5e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182348, "upload_time": "2019-02-18T17:11:28", "url": "https://files.pythonhosted.org/packages/95/7d/61924eae06c4b17a936b6130a70da943b62d80e735d841176244b84e61c4/mirpyidl-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37396446dee79ddb752c60d14d73f5e8", "sha256": "5fce2a7f3c5a22099770d1eed4b4aac94751f6a74a6cb13c8c15dc9c567b14e3" }, "downloads": -1, "filename": "mirpyidl-0.4.1.tar.gz", "has_sig": false, "md5_digest": "37396446dee79ddb752c60d14d73f5e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182348, "upload_time": "2019-02-18T17:11:28", "url": "https://files.pythonhosted.org/packages/95/7d/61924eae06c4b17a936b6130a70da943b62d80e735d841176244b84e61c4/mirpyidl-0.4.1.tar.gz" } ] }