Skip to main content

Try to import all modules below a given root

Project description

A context for writing a file which leaves it unchanged if an exception is thrown.

Example:

with safe_writer(filename) as fp:
    for line in source():
        print(line, file=fp)

# If there's an exception in the block, then `filename` is reverted
# to its initial state

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

safe_writer-0.9.3.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safe_writer-0.9.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file safe_writer-0.9.3.tar.gz.

File metadata

  • Download URL: safe_writer-0.9.3.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for safe_writer-0.9.3.tar.gz
Algorithm Hash digest
SHA256 d40cf16655571095426ef9c0e7b3ab3054b02d4adffbc575cc26ecbf266a9241
MD5 b54fe9f2479c595f5cc61fa5278f5052
BLAKE2b-256 6021365efc99762bf8182677119a849d19271de7b6ceaf2f8d3df8d8977923fb

See more details on using hashes here.

File details

Details for the file safe_writer-0.9.3-py3-none-any.whl.

File metadata

  • Download URL: safe_writer-0.9.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1

File hashes

Hashes for safe_writer-0.9.3-py3-none-any.whl
Algorithm Hash digest
SHA256 94fe9c425ff0afedb7cc23cffbc913b78b1f7a1af7ad23f87558a5728e4ba0b6
MD5 4941158389fbfa91af92165f159e36b2
BLAKE2b-256 ae20cc5da93aa0114a9ed91f3f2f647341d3208752bda62785f5dd08f977a6ba

See more details on using hashes here.

Supported by

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