Skip to main content

Tempfile wrapper to ensure output files are either complete, or empty. Also handles stdout, which gives no truncation guarantees.

Project description

Tool to facilitate console script output redirection. When scripts run, often they have an output file option. If no output option is specified, its common to write to stdout. Its common to use tempfiles as output, and then rename the tempfile to the output name as the last step of the program so that the flip of output is atomic and partial/truncated/corrupt output is not confused as successful output. This is especially true when dealing with make, as exiting with error will stop make, but subsequent runs will assume that partial output files left in the workspace are complete. Writing to stdout gives no guarantees about partial results due to truncation.

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

safeoutput-2.1.tar.gz (4.8 kB view details)

Uploaded Source

File details

Details for the file safeoutput-2.1.tar.gz.

File metadata

  • Download URL: safeoutput-2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for safeoutput-2.1.tar.gz
Algorithm Hash digest
SHA256 6b12abe0018afe5a39fe35a9561658b04b5875c1f9297429a82532d74f9ecf14
MD5 9a674cf716688f60efa6f3943367e50b
BLAKE2b-256 dcd2c67517dc8ace00b18db39d249812f10e94561c5fb8822325a55aca36601d

See more details on using hashes here.

Supported by

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