{ "info": { "author": "Ales Krejci", "author_email": "aleskrejcicz@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "(SP)TEMPDIR\r\n===========\r\n\r\n**Function parameters:**\r\n\r\n::\r\n\r\n sptempdir.TemporaryDirectory(suffix=\"\", prefix=\"\", dir=None, delete=True)\r\n\r\nBy default temporary directory will be deleted when function it is\r\nclosed.\r\n\r\nExample 1:\r\n~~~~~~~~~~\r\n\r\nThe ``name`` property returns the name of a temporary directory.\r\n\r\n.. code:: python\r\n\r\n import os\r\n from sptempdir import TemporaryDirectory\r\n\r\n with TemporaryDirectory(prefix=\"prefbegin_\", suffix=\"_suffend\") as temp:\r\n print('temp.name:', temp.name) # retrieve the name temporary directory\r\n print('Inside:', os.path.exists(temp.name))\r\n \r\n print('Outside:', os.path.exists(temp.name))\r\n\r\n*Terminal output:*\r\n\r\n::\r\n\r\n $ temporary_directory.py\r\n temp.name: /tmp/prefbegin_66XxiFkN6Nm4_suffend\r\n Inside: True\r\n Outside: False\r\n\r\nExample 2:\r\n~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n import os\r\n from sptempdir import TemporaryDirectory\r\n\r\n temp = TemporaryDirectory()\r\n print('temp.name:', temp.name) # retrieve the name temporary directory\r\n print('Tempdir exists:', os.path.exists(temp.name))\r\n\r\n temp.remove() # manually remove temporary directory\r\n print('Tempdir exists:', os.path.exists(temp.name))\r\n\r\n*Terminal output:*\r\n\r\n::\r\n\r\n $ temporary_directory.py\r\n temp.name: /tmp/RCgAzfsATQnb\r\n Tempdir exists: True\r\n Tempdir exists: False\r\n\r\nExample 3:\r\n~~~~~~~~~~\r\n\r\nIf the delete parameter is ``delete=False``, the temp directory is not\r\ndeleted.\r\n\r\n.. code:: python\r\n\r\n import os\r\n from sptempdir import TemporaryDirectory\r\n\r\n temp = TemporaryDirectory(delete=False)\r\n print('temp.name:', temp.name) # retrieve the name temporary directory\r\n print('Tempdir exists:', os.path.exists(temp.name))\r\n\r\n temp.remove() # manually remove temporary directory\r\n print('Tempdir exists:', os.path.exists(temp.name))\r\n\r\n*Terminal output:*\r\n\r\n::\r\n\r\n $ temporary_directory.py\r\n temp.name: /tmp/kWwCWn42NRsr\r\n Tempdir exists: True\r\n Tempdir exists: False\r\n\r\nExample 4:\r\n~~~~~~~~~~\r\n\r\nSpecific ``dir`` where you want to create temporary directory.\r\n\r\n.. code:: python\r\n\r\n from sptempdir import TemporaryDirectory\r\n\r\n temp = TemporaryDirectory(dir=\"/home/user/Desktop\")\r\n print(temp.name) # retrieve the name temporary directory\r\n\r\n*Terminal output:*\r\n\r\n::\r\n\r\n $ temporary_directory.py\r\n /home/user/Desktop/4ZdTvLNqVuyE\r\n\r\nInstallation:\r\n~~~~~~~~~~~~~\r\n\r\n::\r\n\r\n pip install sptempdir\r\n\r\nLicense:\r\n~~~~~~~~\r\n\r\n::\r\n\r\n BSD\r\n\r\n--------------\r\n\r\n(SP)TEMPDIR = **( S**\\ imple **P**\\ ython **)** **TEMPDIR**\r\n\r\n--------------\r\n\r\n.. image:: https://img.shields.io/travis/aleskrejcicz/sptempdir/master.svg\r\n :target: https://github.com/aleskrejcicz/sptempdir\r\n\r\n.. image:: https://img.shields.io/pypi/v/sptempdir.svg\r\n :target: https://pypi.python.org/pypi/sptempdir\r\n\r\n.. image:: https://img.shields.io/pypi/pyversions/sptempdir.svg\r\n :target: https://pypi.python.org/pypi/sptempdir\r\n\r\n.. image:: https://img.shields.io/pypi/l/sptempdir.svg\r\n :target: https://pypi.python.org/pypi/sptempdir", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aleskrejcicz/sptempdir", "keywords": "tempdir", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "sptempdir", "package_url": "https://pypi.org/project/sptempdir/", "platform": "any", "project_url": "https://pypi.org/project/sptempdir/", "project_urls": { "Homepage": "https://github.com/aleskrejcicz/sptempdir" }, "release_url": "https://pypi.org/project/sptempdir/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "This module generates temporary directories", "version": "0.1.5" }, "last_serial": 2812395, "releases": { "0.1.0": [], "0.1.2": [ { "comment_text": "", "digests": { "md5": "80a2f624b3567cd70ad29dbdc07def86", "sha256": "562aa37970c354517ead59c9230ea7b699ef36941dbfe1474220899960fa4950" }, "downloads": -1, "filename": "sptempdir-0.1.2.tar.gz", "has_sig": false, "md5_digest": "80a2f624b3567cd70ad29dbdc07def86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2764, "upload_time": "2015-07-11T17:04:31", "url": "https://files.pythonhosted.org/packages/cf/ea/53a20b65705a1d2a3f06656cb9ee09d1506cc877aed2a1b0514923d8d49d/sptempdir-0.1.2.tar.gz" } ], "0.1.2a0": [], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b58d9662c4b06b4813f9d3e281558244", "sha256": "f64f0c29b858451f55ec5e6453633e5a9dcbaa79a0aec2215d7125b66e7045de" }, "downloads": -1, "filename": "sptempdir-0.1.3.tar.gz", "has_sig": false, "md5_digest": "b58d9662c4b06b4813f9d3e281558244", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3253, "upload_time": "2015-07-13T15:41:57", "url": "https://files.pythonhosted.org/packages/96/29/d549df444744718fad026ea4751ad7cbcfdc2d63845c123497db12e5fe61/sptempdir-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "13c912142685b6ff10ba3d1e8458713e", "sha256": "df31dd93d04b4a52299d85935351416b22ecaacb024d72338328b85442c82065" }, "downloads": -1, "filename": "sptempdir-0.1.4.tar.gz", "has_sig": false, "md5_digest": "13c912142685b6ff10ba3d1e8458713e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3423, "upload_time": "2015-07-16T19:09:03", "url": "https://files.pythonhosted.org/packages/3d/95/a6ae4c3c57431794eae59e4743010e6f196b44ff10ce40942a38f22cdeb5/sptempdir-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "0d18f06525d6c85910375cb71a19c828", "sha256": "b6f466f90feba30f8eab8f659fee8702072d775436bcbc917fab94783cb68add" }, "downloads": -1, "filename": "sptempdir-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0d18f06525d6c85910375cb71a19c828", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3292, "upload_time": "2017-04-18T20:48:56", "url": "https://files.pythonhosted.org/packages/7e/9d/a2fbd2d0b5b0a05b91a83d55c535e72c44fdfc2cfff575ba7b40f7f8abf9/sptempdir-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d18f06525d6c85910375cb71a19c828", "sha256": "b6f466f90feba30f8eab8f659fee8702072d775436bcbc917fab94783cb68add" }, "downloads": -1, "filename": "sptempdir-0.1.5.tar.gz", "has_sig": false, "md5_digest": "0d18f06525d6c85910375cb71a19c828", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3292, "upload_time": "2017-04-18T20:48:56", "url": "https://files.pythonhosted.org/packages/7e/9d/a2fbd2d0b5b0a05b91a83d55c535e72c44fdfc2cfff575ba7b40f7f8abf9/sptempdir-0.1.5.tar.gz" } ] }