{ "info": { "author": "Joey Sham", "author_email": "sham.joey@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Nested Print\n============\n\nA lightweight nested printing, for all your function within loops within\nfunction needs\n\nInstallation\n------------\n\nYou can install using pip with\n\n.. code:: bash\n\n pip3 install --user nested_print\n\nUsage\n-----\n\nThis functions like an extension to the python print API, so you can use\n``end`` and ``sep`` and everything else listed in the `print\nAPI `__. Only\nadditional fields are added:\n\n- level\n- nest\n\nBasic Example\n~~~~~~~~~~~~~\n\n.. code:: python\n\n from nested_print import nprint\n\n nprint(\"hi\", \"there\", level=2) # prints \\t\\t hi there\n nprint(\"hi\", \"there\", level=1, nest=\"--\") # prints -- hi there\n\nMotivation Example\n~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n from nested_print import nprint\n\n nprint(\"here\")\n for i in range(10):\n nprint(i, level=1)\n for j in range(3):\n nprint(j, level=2)\n\nwhich prints\n\n.. code:: bash\n\n here\n 0\n 0\n 1\n 2\n 1\n 0\n 1\n 2\n ...\n\nso it becomes easier for me to debug\n\nAPI\n~~~\n\nlevel\n^^^^^\n\nThis describes how many \u201cnest\u201d or \u201cindentations\u201d to add. Setting\n``level=0`` is the same as using print. ``level=1`` indents the output\nonce, such that a ``\\t`` is added in front when printing.\n\nnest\n^^^^\n\nBy default, nest is set to ``\\t``. This value can be set if you want to\nmodify the indentation. For example, instead of using ``\\t``, you can\nset ``nest=\" \"`` to just add 2 spaces as the indentation. Or set\n``nest=\"--\"`` to set two dashes for every indentation.\n\nVersions\n--------\n\n**1.0.x** \\* Original publish and its fixes\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joeyism/py-nprint", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nprint", "package_url": "https://pypi.org/project/nprint/", "platform": "", "project_url": "https://pypi.org/project/nprint/", "project_urls": { "Homepage": "https://github.com/joeyism/py-nprint" }, "release_url": "https://pypi.org/project/nprint/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A lightweight nested printing, for all your function within loops within function needs", "version": "1.0.0" }, "last_serial": 3422595, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "bc72886f09e240929c349a4a5394e3e4", "sha256": "2ccd8e7b1cd82764bad39f66257dfe96694a6221a0859adeb79857d70c219ba6" }, "downloads": -1, "filename": "nprint-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bc72886f09e240929c349a4a5394e3e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3894, "upload_time": "2017-12-17T05:06:44", "url": "https://files.pythonhosted.org/packages/22/e7/15f03285cb140d2556ffbc4e5e16ada31246afb955f1951ac3bc953feb80/nprint-1.0.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bc72886f09e240929c349a4a5394e3e4", "sha256": "2ccd8e7b1cd82764bad39f66257dfe96694a6221a0859adeb79857d70c219ba6" }, "downloads": -1, "filename": "nprint-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bc72886f09e240929c349a4a5394e3e4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3894, "upload_time": "2017-12-17T05:06:44", "url": "https://files.pythonhosted.org/packages/22/e7/15f03285cb140d2556ffbc4e5e16ada31246afb955f1951ac3bc953feb80/nprint-1.0.0-py2.py3-none-any.whl" } ] }