capture-stdout-decorator


Namecapture-stdout-decorator JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/capture_stdout_decorator
SummaryCaptures stdout
upload_time2023-01-06 13:22:42
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords capture stdout
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Captures stdout



```python

pip install capture-stdout-decorator

```



```python

from capture_stdout_decorator import print_capture

@print_capture

def hahaha():

    print("babab")

    return 4

@print_capture(print_output=False, return_func_val=False)

def hahaha2():

    print("babab")

    return 4

x = hahaha()

print(f'{x=}')

y = hahaha2()

print(f'{y=}')



# output:

babab

x=(4, 'babab\n')

y='babab\n'

		

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/capture_stdout_decorator",
    "name": "capture-stdout-decorator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Capture,stdout",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/11/52/af819e625edb0b66a7913e4e77de77d16b1832816b44a1ed1a97a5e97407/capture_stdout_decorator-0.10.tar.gz",
    "platform": null,
    "description": "\n# Captures stdout\n\n\n\n```python\n\npip install capture-stdout-decorator\n\n```\n\n\n\n```python\n\nfrom capture_stdout_decorator import print_capture\n\n@print_capture\n\ndef hahaha():\n\n    print(\"babab\")\n\n    return 4\n\n@print_capture(print_output=False, return_func_val=False)\n\ndef hahaha2():\n\n    print(\"babab\")\n\n    return 4\n\nx = hahaha()\n\nprint(f'{x=}')\n\ny = hahaha2()\n\nprint(f'{y=}')\n\n\n\n# output:\n\nbabab\n\nx=(4, 'babab\\n')\n\ny='babab\\n'\n\n\t\t\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Captures stdout",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/capture_stdout_decorator"
    },
    "split_keywords": [
        "capture",
        "stdout"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dee17c95f014a63970bedd455884277e47015a05788c85b7b3f2cb7a9ee837e5",
                "md5": "86e8f44e34365a78d8cd1314523c8163",
                "sha256": "ec61ae42a7558f0751476320c29ff2bd11edf5e44763a95bc40fce1c5adb6605"
            },
            "downloads": -1,
            "filename": "capture_stdout_decorator-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "86e8f44e34365a78d8cd1314523c8163",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4649,
            "upload_time": "2023-01-06T13:22:41",
            "upload_time_iso_8601": "2023-01-06T13:22:41.014289Z",
            "url": "https://files.pythonhosted.org/packages/de/e1/7c95f014a63970bedd455884277e47015a05788c85b7b3f2cb7a9ee837e5/capture_stdout_decorator-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1152af819e625edb0b66a7913e4e77de77d16b1832816b44a1ed1a97a5e97407",
                "md5": "1ca416cc494fed3ebf532df0dc64b5c0",
                "sha256": "3050c7511491f0607605e6c043a0c4b5edc8c7fc02e5a36895ff3ad80baeddb9"
            },
            "downloads": -1,
            "filename": "capture_stdout_decorator-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "1ca416cc494fed3ebf532df0dc64b5c0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3222,
            "upload_time": "2023-01-06T13:22:42",
            "upload_time_iso_8601": "2023-01-06T13:22:42.526199Z",
            "url": "https://files.pythonhosted.org/packages/11/52/af819e625edb0b66a7913e4e77de77d16b1832816b44a1ed1a97a5e97407/capture_stdout_decorator-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-06 13:22:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "capture_stdout_decorator",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "capture-stdout-decorator"
}
        
Elapsed time: 0.25786s