Skip to main content

A Python module for writing hex string content to a file.

Project description


A Python module for writing hex string content to a file.

What it does

Writes ascii hex strings to a file directly as in binary hex format. The string can be multi-line or single-line and 0x-prefixed or not. Excess whitespace in the input is ignored.

The following input (multi-line string):
98765432 3456789A

Would result in the following file content:


Python 2/3 compatible.


Get the module via pip: pip install hex2file. Once installed 'hex2file' will be added to your path and the module will be available for importing in your Python projects.


Command Line

When pip installed, hex2file is added to your path. It can accept input directly from stdin or from a file with the '-f' flag. See hex2file --help.

Example: echo "0xFF00FF00" | hex2file /tmp/test


The module can also be imported into a Python project. After installing it simply import hex2file and use hex2file.write().


Run the tests using python test from the root directory of this repository.

Project details

Download files

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

Files for hex2file, version 1.1.1
Filename, size File type Python version Upload date Hashes
Filename, size hex2file-1.1.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page