{ "info": { "author": "Michael R. Shannon", "author_email": "mrshannon.aerospace@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering" ], "description": "fortran-format-converter\n========================\n\nConvert Fortran format specifiers to Python format strings.\n\n|build-status|\n|coverage-status|\n\n|version|\n|supported-versions|\n|wheel|\n|status|\n\n\n\nRequirements\n------------\n\n* Python 3.5 or greater\n* regex_\n* cached-property_\n\n\n\nInstallation\n------------\n\n`fortran-format-converter` is on PyPI_ so the easiest way to install it is:\n\n.. code-block:: text\n\n $ pip install fortran-format-converter\n\n\n\nUsage\n-----\n\nCurrently `fortran-format-converter` only handles simple conversions and in a\nsingle direction, Fortan -> Python.\n\n\nWe begin by importing the converter.\n\n.. code-block:: python\n\n import fortran_format_converter as ffc\n\nNow to convert a Fortran style format specification to a Python format\nstring is as simple as supplying the `convert` function with the Fortran\nformatting specification.\n\n.. code-block:: python\n\n >>> ffc.convert('F6.2')\n '6.2f'\n\nMost types of Fortran format specifications are supported, such as binary.\n\n.. code-block:: python\n\n >>> ffc.convert('B16.16')\n '016b'\n\nIf an invalid format string is given an error will be raised.\n\n.. code-block:: python\n\n >>> ffc.convert('J4')\n Traceback (most recent call last):\n ...\n ValueError: 'J4' is not a valid Fortran format specifier\n\nSometimes it may be desirable to parameterized the format. This can be\naccomplished with the `width`, `align`, and `precision` fields of the\n`Format` class.\n\n.. code-block:: python\n\n >>> format = ffc.Format('F5.2')\n >>> '{:{width}.{prec}f}'.format(2.718281828459, width=format.width, prec=format.precision)\n 2.72\n\n.. note::\n\n `fortran-format-converter` is a best effort converter, many Fortran format\n strings are not convertible to Python format strings. When the format is\n not compatible a similar but not necessarily identical format will be used.\n\n If Fortran identical formatting is desired you should look into the\n excellent fortranformat_ package by *Brendan Arnold* which reads or writes\n directly without translation through Python format strings.\n `fortran-format-converter` is intended for applications where a Python\n compatible format string (and not the result) is required, such as for\n matplotlib_ tick formatting.\n\n\n.. _PyPI: https://pypi.org/\n.. _fortranformat: https://bitbucket.org/brendanarnold/py-fortranformat/src\n.. _matplotlib: https://matplotlib.org/\n.. _regex: https://bitbucket.org/mrabarnett/mrab-regex\n.. _cached-property: https://github.com/pydanny/cached-property\n\n.. |build-status| image:: https://travis-ci.com/ccarocean/fortran-format-converter.svg?branch=master&style=flat\n :target: https://travis-ci.com/ccarocean/fortran-format-converter\n :alt: Build status\n\n.. |coverage-status| image:: http://codecov.io/gh/ccarocean/fortran-format-converter/coverage.svg?branch=master\n :target: http://codecov.io/gh/ccarocean/fortran-format-converter?branch=master\n :alt: Test coverage\n\n.. |version| image:: https://img.shields.io/pypi/v/fortran-format-converter.svg\n :alt: PyPI Package latest release\n :target: https://pypi.python.org/pypi/fortran-format-converter\n\n.. |status| image:: https://img.shields.io/pypi/status/fortran-format-converter.svg\n :alt: Status\n :target: https://pypi.python.org/pypi/fortran-format-converter\n\n.. |wheel| image:: https://img.shields.io/pypi/wheel/fortran-format-converter.svg\n :alt: PyPI Wheel\n :target: https://pypi.python.org/pypi/fortran-format-converter\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/fortran-format-converter.svg\n :alt: Supported versions\n :target: https://pypi.python.org/pypi/fortran-format-converter\n\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/fortran-format-converter.svg\n :alt: Supported implementations\n :target: https://pypi.python.org/pypi/fortran-format-converter\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ccarocean/fortran-format-converter", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fortran-format-converter", "package_url": "https://pypi.org/project/fortran-format-converter/", "platform": "", "project_url": "https://pypi.org/project/fortran-format-converter/", "project_urls": { "Homepage": "https://github.com/ccarocean/fortran-format-converter" }, "release_url": "https://pypi.org/project/fortran-format-converter/0.1.3/", "requires_dist": [ "cached-property", "regex" ], "requires_python": "", "summary": "Convert Fortran format specifiers to Python format strings.", "version": "0.1.3" }, "last_serial": 5645445, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b70e11a92c4d87a643b1873b8ceb1cbf", "sha256": "9e723fccc0d94c5c2256436cca8689077cdb594fb46b4bd70a3c1bb0cd2df397" }, "downloads": -1, "filename": "fortran_format_converter-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b70e11a92c4d87a643b1873b8ceb1cbf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5881, "upload_time": "2019-06-06T23:30:48", "url": "https://files.pythonhosted.org/packages/be/1c/f03ecf7533778c61e152bdae1fc8fe1bf0f4e7b2fe2ed28ee0f806d4dffc/fortran_format_converter-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acddbebcde8904259b5f186e6d1553bb", "sha256": "51f077b8aaa18089dc8631034088a3169ef7adc986d3367402343073e24d4381" }, "downloads": -1, "filename": "fortran-format-converter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "acddbebcde8904259b5f186e6d1553bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5851, "upload_time": "2019-06-06T23:30:51", "url": "https://files.pythonhosted.org/packages/80/a8/0e264c98b876fffface9da4b753b0741a57a4587f012169c136747cc265c/fortran-format-converter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9f5d9a626e24efa3860effa226a89e97", "sha256": "13ca618dcfb3c897de9b632144fa42cce0795611bf348a4a8c005571e4ae9238" }, "downloads": -1, "filename": "fortran_format_converter-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9f5d9a626e24efa3860effa226a89e97", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5880, "upload_time": "2019-06-06T23:53:52", "url": "https://files.pythonhosted.org/packages/65/1e/e3db7c7ace52c53170b91add919b1b0582cf8f7f6dcd4f7893fe3fb80483/fortran_format_converter-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c6266a79b6417c2592dce9ff14a05ff", "sha256": "4a467252d796c6b29ef7559970e03df16a0eb0f0eed736326bba5dba98853332" }, "downloads": -1, "filename": "fortran-format-converter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6c6266a79b6417c2592dce9ff14a05ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5975, "upload_time": "2019-06-06T23:53:53", "url": "https://files.pythonhosted.org/packages/7b/a7/704f10edff9ad77ab179607e3957f1ad77310e17c1e2f731c046cda4df54/fortran-format-converter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a8c7f06d5c372d3e32703c302938a729", "sha256": "ae46623fdfa7852ac7ee3622f6b171932b2c655b9c48790e83392a433eb791aa" }, "downloads": -1, "filename": "fortran_format_converter-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a8c7f06d5c372d3e32703c302938a729", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5894, "upload_time": "2019-06-11T20:10:24", "url": "https://files.pythonhosted.org/packages/a9/97/500b35a7970a9183b4321e6297842ec2787b9da23e29515e62ef7b962180/fortran_format_converter-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "46e3e0de904765a2994cb4d252a02855", "sha256": "fcb27a8550aaa292aaa7371b239a796c7bc47236bc82a0c4072b7b013f121c9a" }, "downloads": -1, "filename": "fortran-format-converter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "46e3e0de904765a2994cb4d252a02855", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5949, "upload_time": "2019-06-11T20:10:26", "url": "https://files.pythonhosted.org/packages/c4/4e/d0fe3b2fdc15779155b403fa7dbeeba6849f7aba730bc4f1a1355575472d/fortran-format-converter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f189ffe38b0800f7b0bb5053deeb3968", "sha256": "df92d4ebad750f9d043143abef6517f82d676af6c0f7f21ca561996888d58192" }, "downloads": -1, "filename": "fortran_format_converter-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f189ffe38b0800f7b0bb5053deeb3968", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6113, "upload_time": "2019-08-07T14:50:44", "url": "https://files.pythonhosted.org/packages/9a/92/abfc900b7746742e99db17cab6584680a803f484508eb9f35409a5d60fca/fortran_format_converter-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb06c5ae212f082ee4a72d859b88db81", "sha256": "389fa8bc3ee46c0fdae7dd930c9fa6f0582755ffbb4a6bbb97e8559c2feb5559" }, "downloads": -1, "filename": "fortran-format-converter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "eb06c5ae212f082ee4a72d859b88db81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6109, "upload_time": "2019-08-07T14:50:46", "url": "https://files.pythonhosted.org/packages/e7/d2/2edd076fc506f3e0ba3cb29c7bd81c43e07c3c7f25ee4f78379531cf260d/fortran-format-converter-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f189ffe38b0800f7b0bb5053deeb3968", "sha256": "df92d4ebad750f9d043143abef6517f82d676af6c0f7f21ca561996888d58192" }, "downloads": -1, "filename": "fortran_format_converter-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f189ffe38b0800f7b0bb5053deeb3968", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6113, "upload_time": "2019-08-07T14:50:44", "url": "https://files.pythonhosted.org/packages/9a/92/abfc900b7746742e99db17cab6584680a803f484508eb9f35409a5d60fca/fortran_format_converter-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eb06c5ae212f082ee4a72d859b88db81", "sha256": "389fa8bc3ee46c0fdae7dd930c9fa6f0582755ffbb4a6bbb97e8559c2feb5559" }, "downloads": -1, "filename": "fortran-format-converter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "eb06c5ae212f082ee4a72d859b88db81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6109, "upload_time": "2019-08-07T14:50:46", "url": "https://files.pythonhosted.org/packages/e7/d2/2edd076fc506f3e0ba3cb29c7bd81c43e07c3c7f25ee4f78379531cf260d/fortran-format-converter-0.1.3.tar.gz" } ] }