Skip to main content

A collection of handy modules, almost guaranteed to get you into trouble.

Project description

DHP is a library of snippets almost guaranteed to get you into trouble.

I obtained it from a vendor on the corner outside of PyCon.

Phrasebook Contents

dhp.test

  • tempfile_containing - generate a temporary file that contains indicated contents and returns the filename for use. When finished the tempfile is removed.

from dhp.test import tempfile_containing

contents = 'I will not by this record, it is scratched.'
with tempfile_containing(contents) as fname:
    do_something(fname)

Supports

Tested on Python 2.7, 3.2, 3.3, 3.4

Build Status

Requirements

None.

Installation

Make sure to get the latest version.

pip install dhp

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dhp-0.0.1.tar.gz (2.1 kB view details)

Uploaded Source

File details

Details for the file dhp-0.0.1.tar.gz.

File metadata

  • Download URL: dhp-0.0.1.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for dhp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1284c55c6ea0e28548ce229761272eeac1adf8d8b87a445bfa800ae658a26cea
MD5 18c7843b4a439407e2539125160a7117
BLAKE2b-256 25ad4a5ec9163331e8e7b7f22cf6dd8baa2150463d514371cb489eae991bfed5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page