This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Function parameters:

sptempdir.TemporaryDirectory(suffix="", prefix="", dir=None, delete=True)

By default temporary directory will be deleted when function it is closed.

Example 1:

The name property returns the name of a temporary directory.

import os
import sptempdir

with sptempdir.TemporaryDirectory(prefix="prefbegin_", suffix="_suffend") as temp:
    print('temp.name:', temp.name)  # retrieve the name temporary directory
    print('Inside:', os.path.exists(temp.name))

print('Outside:', os.path.exists(temp.name))

Terminal output:

$ test_create_tempdir.py
temp.name: /tmp/prefbegin_66XxiFkN6Nm4_suffend
Inside: True
Outside: False

Example 2:

import os
import sptempdir

temp = sptempdir.TemporaryDirectory()
print('temp.name:', temp.name)  # retrieve the name temporary directory
print('Tempdir exists:', os.path.exists(temp.name))

temp.rmtemp()  # manually remove temporary directory
print('Tempdir exists:', os.path.exists(temp.name))

Terminal output:

$ test_create_tempdir.py
temp.name: /tmp/RCgAzfsATQnb
Tempdir exists: True
Tempdir exists: False

Example 3:

If the delete parameter is delete=False, the temp directory is not deleted.

import os
import sptempdir

temp = sptempdir.TemporaryDirectory(delete=False)
print('temp.name:', temp.name)  # retrieve the name temporary directory
print('Tempdir exists:', os.path.exists(temp.name))

temp.rmtemp()  # manually remove temporary directory
print('Tempdir exists:', os.path.exists(temp.name))

Terminal output:

$ test_create_tempdir.py
temp.name: /tmp/kWwCWn42NRsr
Tempdir exists: True
Tempdir exists: True

Example 4:

Specific path where you want to create temporary directory.

import sptempdir

temp = sptempdir.TemporaryDirectory(dir="/home/user/Desktop")
print(temp.name)  # retrieve the name temporary directory

Terminal output:

$ test_create_tempdir.py
/home/user/Desktop/4ZdTvLNqVuyE

Installation:

pip install sptempdir
# or
pip install https://github.com/sefikail/sptempdir/tarball/master

License:

https://creativecommons.org/licenses/by/3.0/

(SP)TEMPDIR = ( Sefikail + Python ) + TEMPDIR

Release History

Release History

0.1.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2a0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
sptempdir-0.1.4.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Jul 16, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting